Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

Resources from markup

<Window x: Class="WpfApplication1.Window1"   Title="Resources"   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <Window.Resources>     <SolidColorBrush x:Key="myBrush" Color="LightGreen" />   </Window.Resources>   <Grid Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}">     <TextBlock FontSize="36" Width="200" Height="200" Background="{StaticResource myBrush}">Hello!</TextBlock>   </Grid> </Window>