Skip to content

A WPF component making it easy to show the corresponding XAML for WPF custom styles and controls

License

Notifications You must be signed in to change notification settings

Keboo/ShowMeTheXAML

Repository files navigation

ShowMeTheXAML

A WPF component making it easy to show the corresponding XAML for WPF custom styles and controls. It was built out of a need to shows the XAML for the theme library MaterialDesignInXamlToolkit. You can see it working in the demo application for MaterialDesignInXamlToolkit.

NuGet Status NuGet Status NuGet Status

Setup

  1. Install the MSBuild package. PM> Install-Package ShowMeTheXAML.MSBuild This will also install the ShowMeTheXAML package as well.
  2. Add the following code in your App.xaml.cs
protected override void OnStartup(StartupEventArgs e)
{
    XamlDisplay.Init();
    base.OnStartup(e);
}
  1. (Optional) The default template is pretty basic. For a better looking style add the ShowMeTheXAML.AvalonEdit package. PM> Install-Package ShowMeTheXAML.AvalonEdit In App.xaml include the resource dictionary.
<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/ShowMeTheXAML.AvalonEdit;component/Themes/xamldisplayer.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

Usage

<smtx:XamlDisplay UniqueKey="SomeUniqueString">
  <StackPanel>
    <Button Content="Some Content" />
    <TextBlock Text="Text" />
  </StackPanel>
</smtx:XamlDisplay>

About

A WPF component making it easy to show the corresponding XAML for WPF custom styles and controls

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages