私はスタイルのためにこのコードを持っています
<Window.Resources>
<Style x:Key="Mystyle" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid >
<Polygon Name="poly" Points="0,0 0,100 50,200"
Fill=" TemplateBinding Background}"
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<Button Name="b1" Style="{StaticResource Mystyle }"></Button>
</Grid>
いくつかの計算に基づいて、静的ではなく動的なスタイルタグでポリゴンのポイントを設定する必要があります。ポイントをポリゴンにバインドするにはどうすればよいですか。例私はこれを持っています
PointCollection pc=this.CalculatePolygonPoints(new Point(0,0), 100,Orientation.Flat);
このPCをポリゴンダイナミックにバインドするにはどうすればよいですか?