<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:
0 comments:
Post a Comment