基本的に、横向きの三角形のボタンがあります(「再生」ボタン用)。xaml デザイン エディターでは、ボタンが三角形として正しく表示されます。ただし、アプリケーションを実行すると、標準の当たり障りのない Windows ボタンとして表示されます。スタイルは次のとおりです。
<Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<ed:RegularPolygon x:Name="PlayerPlay" Fill="#FF080808" InnerRadius="1" PointCount="3" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="Black">
<ed:RegularPolygon.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="90.635"/>
<TranslateTransform/>
</TransformGroup>
</ed:RegularPolygon.RenderTransform>
</ed:RegularPolygon>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True"/>
<Trigger Property="IsDefaulted" Value="True"/>
<Trigger Property="IsMouseOver" Value="True"/>
<Trigger Property="IsPressed" Value="True"/>
<Trigger Property="IsEnabled" Value="False"/>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
ボタンは次のとおりです。
<Button x:Name="PlayerPlay" Click="PlayerPlay_Click_1" Content="" Margin="63.54,4.752,59.686,6.682" Style="{DynamicResource ButtonStyle1}"/>
何がうまくいかないのですか?
ありがとう!