WpfExtensions.Xaml 1.0.0

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 1.0.0
dotnet add package WpfExtensions.Xaml --version 1.0.0
<PackageReference Include="WpfExtensions.Xaml" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WpfExtensions.Xaml --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

System.Windows.Extensions

What's New?

Route Feature

            <router:BrowserRouter>
                <router:Route Path="/markup"
                              UnloadTimeout="0:0:2">
                    <router:Route.Component>
                        <local:MarkupDemo Style="{StaticResource FloatInUpStyle}" />
                    </router:Route.Component>
                </router:Route>
                <router:Route Path="{x:Static router:Route.DefaultPath}">
                    <router:Route.Component>
                        <TextBlock Text="404: NOT FOUND! "
                                   FontSize="50"
                                   FontWeight="Bold"
                                   Foreground="Red" />
                    </router:Route.Component>
                </router:Route>
            </router:BrowserRouter>

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

Dynamically switch languages without restarting the app.

<TextBlock Text="{markup:I18n {x:Static language:UiStrings.MainWindow_Title}}" />

System.Windows.Extensions

What's New?

Route Feature

            <router:BrowserRouter>
                <router:Route Path="/markup"
                              UnloadTimeout="0:0:2">
                    <router:Route.Component>
                        <local:MarkupDemo Style="{StaticResource FloatInUpStyle}" />
                    </router:Route.Component>
                </router:Route>
                <router:Route Path="{x:Static router:Route.DefaultPath}">
                    <router:Route.Component>
                        <TextBlock Text="404: NOT FOUND! "
                                   FontSize="50"
                                   FontWeight="Bold"
                                   Foreground="Red" />
                    </router:Route.Component>
                </router:Route>
            </router:BrowserRouter>

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

Dynamically switch languages without restarting the app.

<TextBlock Text="{markup:I18n {x:Static language:UiStrings.MainWindow_Title}}" />

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 65 7/24/2019
1.0.0 82 6/10/2019
0.0.7 115 3/15/2019