Advertisement
Guest User

MainWindow.xaml

a guest
Aug 16th, 2015
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.92 KB | None | 0 0
  1. <Window x:Class="PROJECT.MainWindow"
  2.        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5.        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6.        xmlns:local="clr-namespace:PROJECT"
  7.        mc:Ignorable="d"
  8.        Title="PROJECT" Height="150" Width="300" Topmost="True" WindowStartupLocation="CenterScreen">
  9.     <Window.Resources>
  10.         <Style x:Key="ControlStyle1" TargetType="{x:Type Control}">
  11.             <Style.Triggers>
  12.                 <Trigger Property="IsMouseOver" Value="True">
  13.                     <Setter Property="Background">
  14.                         <Setter.Value>
  15.                             <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  16.                                 <GradientStop Color="#FF124600" Offset="1"/>
  17.                                 <GradientStop Color="#FF289C00" Offset="0.307"/>
  18.                             </LinearGradientBrush>
  19.                         </Setter.Value>
  20.                     </Setter>
  21.                 </Trigger>
  22.             </Style.Triggers>
  23.         </Style>
  24.     </Window.Resources>
  25.     <Grid Opacity="0.85">
  26.         <Button x:Name="button" HorizontalAlignment="Left" Margin="111,39,0,0" VerticalAlignment="Top" Width="75" Height="32" Click="button_Click" Content="Enable" Foreground="White" IsDefault="True" SnapsToDevicePixels="True" FocusVisualStyle="{DynamicResource ControlStyle1}" Style="{DynamicResource ControlStyle1}">
  27.             <Button.Background>
  28.                 <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  29.                     <GradientStop Color="#FF124600" Offset="1"/>
  30.                     <GradientStop Color="#FF289C00" Offset="0.307"/>
  31.                 </LinearGradientBrush>
  32.             </Button.Background>
  33.         </Button>
  34.     </Grid>
  35. </Window>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement