<Button Width="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="Button1" Template="{DynamicResource ButtonControlTemplate1}" Cursor="Hand" Height="12" Margin="0,0,5,2">
<Button.Resources>
<ControlTemplate x:Key="ButtonControlTemplate1" TargetType="{x:Type Button}">
<Polygon x:Name="ButtonPolygon" Stretch="Fill" Points="0,50,600,50 290,100" Stroke="White" StrokeThickness="0"> //Points 是调整三角形的样子
<Polygon.Fill>
<SolidColorBrush Color="Gray" Opacity="0.5"/>
</Polygon.Fill>
</Polygon>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ButtonPolygon" Property="Fill" Value="Black"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="ButtonPolygon" Property="Fill" Value="Gray"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Resources>
</Button>
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。