BradleyUffner

Untitled

Aug 16th, 2017
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.08 KB | None | 0 0
  1. <Window
  2.    x:Class="WpfApp1.MainWindow"
  3.    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4.    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5.    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6.    xmlns:local="clr-namespace:WpfApp1"
  7.    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8.    Title="MainWindow"
  9.    Width="525"
  10.    Height="350"
  11.    mc:Ignorable="d">
  12.     <Window.Resources>
  13.         <Style x:Key="Style1" TargetType="TextBlock">
  14.             <Setter Property="FontSize" Value="24" />
  15.         </Style>
  16.         <Style
  17.            x:Key="Style2"
  18.            BasedOn="{StaticResource Style1}"
  19.            TargetType="TextBlock">
  20.             <Setter Property="FontWeight" Value="Bold" />
  21.         </Style>
  22.         <Style
  23.            x:Key="Style3"
  24.            BasedOn="{StaticResource Style2}"
  25.            TargetType="TextBlock">
  26.             <Setter Property="Background" Value="Red" />
  27.         </Style>
  28.     </Window.Resources>
  29.     <TextBlock Style="{StaticResource Style3}">This is a test!</TextBlock>
  30. </Window>
Add Comment
Please, Sign In to add comment