PNG画像を張り付けたものはサンプルがあったのですが、
XMLで描いたベクターイメージを張り付けるサンプルは見つからなかったので。。。
せっかくWPF使うならベクターで描きたいですよね。
以下のコードはクリックすると〇がロになるToggleButton
のサンプルです。
(ネストがひどいことになってるw)
MainWindow.xaml
<Window x:Class="WpfApplication3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<ToggleButton Height="33" Width="33" Margin="68,64,0,0"
HorizontalAlignment="Left" VerticalAlignment="Top" Cursor="Hand">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Canvas Name="ToggleButtonCanvas">
<Canvas.Background>
<VisualBrush>
<VisualBrush.Visual>
<Canvas>
<Ellipse StrokeThickness="2" Fill="#FFF4F4F5" Stroke="Black"
Height="33" Width="33" Margin="5,5,5,5"
HorizontalAlignment="Left" VerticalAlignment="Top"/>
</Canvas>
</VisualBrush.Visual>
</VisualBrush>
</Canvas.Background>
</Canvas>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="ToggleButtonCanvas" Property="Background">
<Setter.Value>
<VisualBrush>
<VisualBrush.Visual>
<Canvas>
<Rectangle StrokeThickness="2" Fill="#FFF4F4F5" Stroke="Red"
Height="33" Width="33" Margin="0,0,0,0"
HorizontalAlignment="Left" VerticalAlignment="Top"/>
</Canvas>
</VisualBrush.Visual>
</VisualBrush>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
</Grid>
</Window>