Xam*_*Xam 5 silverlight wpf xaml
谁能告诉我如何在Grid控件的给定行/列中居中多边形对象?
我尝试过的例子来自msdn.
<Grid x:Name="LayoutRoot" >
<Polygon Points="300,200 400,125 400,275 300,200"
Stroke="Purple"
StrokeThickness="2"
HorizontalAlignment="Center"
VerticalAlignment="Center" >
<Polygon.Fill>
<SolidColorBrush Color="Blue" Opacity="0.4" />
</Polygon.Fill>
</Polygon>
Run Code Online (Sandbox Code Playgroud)
干杯,
XAM
添加属性:-
HorizontalAlignment="Center" VerticalAlignment="Center"
Run Code Online (Sandbox Code Playgroud)
到Polygon.