XAMLで折れ線を描く〜Polyline
XAMLのサンプルソース
<Canvas
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="300" Height="200"
>
<Polyline Points="0,50 50,100 100,50 150,100 200,50 "
Stroke="black" StrokeThickness="5" />
<Polyline Points="0,100 50,50, 100,100 150,50 200,100"
Stroke="red" StrokeThickness="5" />
</Canvas>
プロパティ
| Height | 高さ 例)Height="100" |
| Width | 横幅 例)Width="100" |
| Canvas.Top | 上端からxずらす 例)Canvas.Top="100" |
| Canvas.Left | 左端からxずらす 例)Canvas.Left="100" |
| Fill | 塗りつぶし 例)Fill="#000000" |
| Stroke | 線の色 例)Stroke="#000000" |
| StrokeThickness | 線の幅 例)StrokeThickness="5" |
| Opacity | 透明度 |
| Canvas.ZIndex | 重なりの順序 |
| X1 | X座標の始点 |
| X2 | Y座標の始点 |
| X2 | X座標の終点 |
| Y2 | Y座標の終点 |
| Points | 折れ線で使用 |