1,使用path画图。
先上图:
代码如下:
View Code
1
<
Grid Width
=
"
713
"
MinWidth
=
"
200
"
MinHeight
=
"
100
"
>
2 < Rectangle Width = " 300 " Height = " 200 " Stroke = " Black " Fill = " Blue " RadiusX = " 100 " RadiusY = " 100 " ></ Rectangle >
3 < Path Data = " M 300,50 L 100,100 L 200,300 z " Stroke = " Black " Fill = " Red " ></ Path >
4
5 </ Grid >
2 < Rectangle Width = " 300 " Height = " 200 " Stroke = " Black " Fill = " Blue " RadiusX = " 100 " RadiusY = " 100 " ></ Rectangle >
3 < Path Data = " M 300,50 L 100,100 L 200,300 z " Stroke = " Black " Fill = " Red " ></ Path >
4
5 </ Grid >
参考:深入浅出wpf