Override custom color
for overriding custom color like
1 2 |
<SolidColorBrush x:Key="xcolor" Color="#6D9DFF" /> |
redefine the same SolidColorBrush with the same Key
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<!-- using resource --> <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="43" Background="{StaticResource xcolor}" Margin="366,177,0,0" VerticalAlignment="Top" Width="116" /> <!-- redefine resource --> <Grid Margin="366,225,0,0" HorizontalAlignment="Left" Width="116" Height="43" VerticalAlignment="Top"> <Grid.Resources> <SolidColorBrush x:Key="xcolor" Color="red" /> </Grid.Resources> <Border BorderBrush="Black" BorderThickness="1" Background="{StaticResource xcolor}" /> </Grid> |
Categories: wpf
Commentaires récents