1: <TextBlock
2: FontFamily="字型名稱"
3: FontSize="字型大小"
4: FontStyle="字型樣式"
5: FontWeight="字型粗細樣式"
6: Foreground="字型前景顏色"
7: Width="文字區塊寬度"
8: Height="文字區塊高度"
9: Opacity="文字透明度"
10: Text="訊息文字"
11: TextWrapping="文字換行">
12: 輸入一段文字,若想要裁切則再增加Clip控制如下
13: <TextBlock.Clip>
14: <EllipseGeometry Center="100,100" RadiusX="50" RadiusY="50"></EllipseGeometry>
15: </TextBlock.Clip>
16: //若想不規則的裁切文字,則加入控制項如下:
17: <TextBlock.Clip>
18: <PathGeometry>
19: <PathFigure StartPoint="0,50" IsClosed="True">
20: <PolyLineSegment Points="80,80"></PolyLineSegment>
21: <PolyLineSegment Points="100,100"></PolyLineSegment>
22: <PolyLineSegment Points="120,120"></PolyLineSegment>
23: <PolyLineSegment Points="900,900"></PolyLineSegment>
24: </PathFigure>
25: </PathGeometry>
26: </TextBlock.Clip>
27: </TextBlock>