Overview
We would like to migrate from our own MVVM library to CommunityToolkit.MVVM. In our library we have implemented several frequently used IValueConverters, which I would like to have in the CommunityToolkit. Can these be added? Where? I'd propose a new folder Converters in the CommunityToolkit.Mvvm project.
API breakdown
- BooleanConverters:
- InverseBooleanConverter
- NullBooleanConverter
- VisibilityConverters:
- BooleanVisibilityConverter
- NullVisiblilityConverter
(each with Reverse property)
Usage example
<Window
xmlns:conv="clr-namespace:CommunityToolkit.Mvvm.Converters;assembly=CommunityToolkit.Mvvm"
>
<Window.Resources>
<conv:NullBooleanConverter x:Name="NullBooleanConverter" />
<conv:NullVisibilityConverter x:Name="NullVisibilityConverter" />
</Window.Resources>
<Grid>
<ListBox ItemsSource="{Binding Items}" Visibility="{Binding Items, Converter={StaticResource NullVisibilityConverter}}" />
<Button Content="Submit" IsEnabled="{Binding Data, Converter={StaticResource NullBooleanConverter}}" />
</Grid>
</Window>
Breaking change?
No
Alternatives
The converters could also be added to the .NET code, but this would not make it available to our net48 applications.
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item
Overview
We would like to migrate from our own MVVM library to CommunityToolkit.MVVM. In our library we have implemented several frequently used
IValueConverters, which I would like to have in the CommunityToolkit. Can these be added? Where? I'd propose a new folder Converters in theCommunityToolkit.Mvvmproject.API breakdown
(each with
Reverseproperty)Usage example
Breaking change?
No
Alternatives
The converters could also be added to the .NET code, but this would not make it available to our net48 applications.
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item