WpfExtensions.Xaml 0.0.7

Some common custom markup extensions for WPF.

There is a newer version of this package available.
See the version list below for details.
Install-Package WpfExtensions.Xaml -Version 0.0.7
dotnet add package WpfExtensions.Xaml --version 0.0.7
<PackageReference Include="WpfExtensions.Xaml" Version="0.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WpfExtensions.Xaml --version 0.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

WpfExtensions.Xaml

1. ComposeExtension

Combine multiple Converters into one pipeline.

<Button Visibility="{Binding SampleCollection, Converter={markup:Compose
                    {StaticResource AnyConverter},
                    {StaticResource NotConverter},
                    {StaticResource BooleanToVisibilityConverter}}}" />

2. IfExtension

Using the Conditional expression in XAML.

<Button Command="{markup:If
                 {Binding BoolProperty},
                 {Binding OkCommand},
                 {Binding CancelCommand}}" />
<UserControl>
    <markup:If Condition="{Binding IsLoading}">
        <markup:If.True>
            <LoadingView />
        </markup:If.True>
        
        <markup:If.False>
        	<LoadedView />
        </markup:If.False>
    </markup:If>
</UserControl>

3. I18nExtension/I18nStringExtension

Dynamically switch languages without restarting the app.

<TextBlock Text="{markup:I18n {x:Static language:UiStrings.MainWindow_Title}}" />
<TextBlock Text="{markup:I18nString {x:Static language:UiStrings.MainWindow_Title}, {Binding Arg0String}, {Binding Arg1String}}" />

WpfExtensions.Xaml

1. ComposeExtension

Combine multiple Converters into one pipeline.

<Button Visibility="{Binding SampleCollection, Converter={markup:Compose
                    {StaticResource AnyConverter},
                    {StaticResource NotConverter},
                    {StaticResource BooleanToVisibilityConverter}}}" />

2. IfExtension

Using the Conditional expression in XAML.

<Button Command="{markup:If
                 {Binding BoolProperty},
                 {Binding OkCommand},
                 {Binding CancelCommand}}" />
<UserControl>
    <markup:If Condition="{Binding IsLoading}">
        <markup:If.True>
            <LoadingView />
        </markup:If.True>
        
        <markup:If.False>
        	<LoadedView />
        </markup:If.False>
    </markup:If>
</UserControl>

3. I18nExtension/I18nStringExtension

Dynamically switch languages without restarting the app.

<TextBlock Text="{markup:I18n {x:Static language:UiStrings.MainWindow_Title}}" />
<TextBlock Text="{markup:I18nString {x:Static language:UiStrings.MainWindow_Title}, {Binding Arg0String}, {Binding Arg1String}}" />

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 68 7/24/2019
1.0.0 83 6/10/2019
0.0.7 117 3/15/2019