![Inline image 1](http://blogs.microsoft.co.il/blogs/amielcohen/clip_image002_thumb_3ADE81C8.jpg)
<Window.Resources>
<Style TargetType="{x:Type ToggleButton}" >
<Setter Property="Width" Value="30"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Margin" Value="3"/>
<Setter Property="Background" Value="Lavender" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Ellipse x:Name="elp" Fill="Lavender"/>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="elp" Property="Fill" Value="DarkBlue"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<StackPanel Orientation="Horizontal" Margin="71,35,163,27">
<ToggleButton/>
<ToggleButton/>
<ToggleButton/>
</StackPanel>
</Grid>
Read more: מילים ב WPF
QR: ![Inline image 2](http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://blogs.microsoft.co.il/blogs/amielcohen/archive/2012/10/14/control-template-style.aspx)
0 comments:
Post a Comment