-
<Grid
-
xmlns="<a href="http://schemas.microsoft.com/winfx/2006/xaml/presentation">http://schemas.microsoft.com/winfx/2006/xaml/presentation</a>"
-
xmlns:x="<a href="http://schemas.microsoft.com/winfx/2006/xaml">http://schemas.microsoft.com/winfx/2006/xaml</a>"
-
xmlns:mc="<a href="http://schemas.openxmlformats.org/markup-compatibility/2006">http://schemas.openxmlformats.org/markup-compatibility/2006</a>"
-
xmlns:d="<a href="http://schemas.microsoft.com/expression/interactivedesigner/2006">http://schemas.microsoft.com/expression/interactivedesigner/2006</a>"
-
mc:Ignorable="d"
-
Background="#FFFFFFFF"
-
x:Name="DocumentRoot"
-
x:Class="SmileyButton.Scene1"
-
Width="200" Height="200">
-
-
<Grid.ColumnDefinitions>
-
<ColumnDefinition Width="*" />
-
</Grid.ColumnDefinitions>
-
<Grid.RowDefinitions>
-
<RowDefinition Height="*"/>
-
</Grid.RowDefinitions>
-
-
<Button x:Name="SmileyButton">
-
<Button.Template>
-
<ControlTemplate TargetType="{x:Type Button}">
-
<Grid x:Name="Grid" ShowGridLines="false">
-
<Grid.ColumnDefinitions>
-
<ColumnDefinition Width="*" />
-
<ColumnDefinition Width="*" />
-
<ColumnDefinition Width="*" />
-
</Grid.ColumnDefinitions>
-
<Grid.RowDefinitions>
-
<RowDefinition Height="*"/>
-
<RowDefinition Height="*"/>
-
<RowDefinition Height="*"/>
-
</Grid.RowDefinitions>
-
<Image x:Name="Image" Source="middle_smiley.png" Grid.ColumnSpan="3" Grid.RowSpan="3" />
-
-
<Rectangle x:Name="TopLeft" Grid.Column="0" Grid.Row="0" Fill="#0FFFFFFF" />
-
<Rectangle x:Name="Top" Grid.Column="1" Grid.Row="0" Margin="0,0,0,0" Fill="#0FFFFFFF"/>
-
<Rectangle x:Name="TopRight" Grid.Column="2" Grid.Row="0" Margin="0,0,0,0" Fill="#0FFFFFFF"/>
-
-
<Rectangle x:Name="MiddleLeft" Grid.Column="0" Grid.Row="1" Margin="0,0,0,0" Fill="#0FFFFFFF"/>
-
<Rectangle x:Name="Middle" Grid.Column="1" Grid.Row="1" Margin="0,0,0,0" Fill="#0FFFFFFF"/>
-
<Rectangle x:Name="MiddleRight" Grid.Column="2" Grid.Row="1" Margin="0,0,0,0" Fill="#0FFFFFFF"/>
-
-
<Rectangle x:Name="BottomLeft" Grid.Column="0" Grid.Row="2" Margin="0,0,0,0" Fill="#0FFFFFFF"/>
-
<Rectangle x:Name="Bottom" Grid.Column="1" Grid.Row="2" Margin="0,0,0,0" Fill="#0FFFFFFF"/>
-
<Rectangle x:Name="BottomRight" Grid.Column="2" Grid.Row="2" Margin="0,0,0,0" Fill="#0FFFFFFF"/>
-
</Grid>
-
<ControlTemplate.Triggers>
-
<Trigger Property="IsPressed" Value="True">
-
<Setter TargetName="Image" Property="Source" Value="surprised_smiley.png"/>
-
</Trigger>
-
<Trigger SourceName="TopLeft" Property="IsMouseOver" Value="true">
-
<Setter TargetName="Image" Property="Source" Value="topleft_smiley.png"/>
-
</Trigger>
-
<Trigger SourceName="Top" Property="IsMouseOver" Value="true">
-
<Setter TargetName="Image" Property="Source" Value="top_smiley.png"/>
-
</Trigger>
-
<Trigger SourceName="TopRight" Property="IsMouseOver" Value="true">
-
<Setter TargetName="Image" Property="Source" Value="topright_smiley.png"/>
-
</Trigger>
-
<Trigger SourceName="MiddleLeft" Property="IsMouseOver" Value="true">
-
<Setter TargetName="Image" Property="Source" Value="middleleft_smiley.png"/>
-
</Trigger>
-
<Trigger SourceName="Middle" Property="IsMouseOver" Value="true">
-
<Setter TargetName="Image" Property="Source" Value="middle_smiley.png"/>
-
</Trigger>
-
<Trigger SourceName="MiddleRight" Property="IsMouseOver" Value="true">
-
<Setter TargetName="Image" Property="Source" Value="middleright_smiley.png"/>
-
</Trigger>
-
<Trigger SourceName="BottomLeft" Property="IsMouseOver" Value="true">
-
<Setter TargetName="Image" Property="Source" Value="bottomleft_smiley.png"/>
-
</Trigger>
-
<Trigger SourceName="Bottom" Property="IsMouseOver" Value="true">
-
<Setter TargetName="Image" Property="Source" Value="bottom_smiley.png"/>
-
</Trigger>
-
<Trigger SourceName="BottomRight" Property="IsMouseOver" Value="true">
-
<Setter TargetName="Image" Property="Source" Value="bottomright_smiley.png"/>
-
</Trigger>
-
-
</ControlTemplate.Triggers>
-
-
</ControlTemplate>
-
</Button.Template>
-
</Button>
-
</Grid>