Material Design WPF, how to get the color to use it on border

11,363

It should be something like:

    <Border BorderBrush="{DynamicResource PrimaryHueMidBrush}" BorderThickness="2" Padding="10" Height="50" Width="300">
        <TextBlock Text="Material Design Test" />
    </Border>

You can replace PrimaryHueMidBrush with PrimaryHueLightBrush, or PrimaryHueDarkBrush.

You can find more info about configuring your App.xaml at MaterailDesign documentation

Share:
11,363
Pierre
Author by

Pierre

Updated on June 07, 2022

Comments

  • Pierre
    Pierre almost 2 years

    Everything is in the title.

    I'd like to get the color that I choose as primary in my ressources :

    <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
    

    To use it on my border BorderBrush:

    <Border BorderBrush="" BorderThickness="2,0,0,0" Padding="10" >
    

    Thanks you