2016-10-03 51 views
0

一切都在标题中。材质设计WPF,如何让边框上的颜色使用它

我想获得我选择在我的ressources作为主要颜色:

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

在我边境BorderBrush使用它:

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

感谢您

回答

1

它应该是这样的:

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

您可以用PrimaryHueLightBrushPrimaryHueDarkBrush替换PrimaryHueMidBrush

你可以找到更多关于配置你的App.xaml的信息在MaterailDesign documentation