製做曲線時,Y軸標籤須要垂直顯示。只需將TextBlock 或 Label 的Layout旋轉90°或270°便可。ide
<TextBlock x:Name="TbYAxis" Canvas.Left="10" Canvas.Top="50" FontSize="20" Foreground="White" Text="Y軸"> <TextBlock.LayoutTransform> <RotateTransform Angle="270"></RotateTransform> </TextBlock.LayoutTransform> </TextBlock> <Label x:Name="LbYAxis" Canvas.Left="50" Canvas.Top="50" FontSize="20" Foreground="White" Content="Y軸" Padding="0"> <Label.LayoutTransform> <RotateTransform Angle="90"></RotateTransform> </Label.LayoutTransform> </Label>