lable的渲染

 1     <StackPanel Margin="10" TextOptions.TextFormattingMode="Display">
 2             <Label TextOptions.TextRenderingMode="Auto" FontSize="9">TextRenderingMode.Auto, small text</Label>
 3             <Label TextOptions.TextRenderingMode="Aliased" FontSize="9">TextRenderingMode.Aliased, small text</Label>
 4             <Label TextOptions.TextRenderingMode="ClearType" FontSize="9">TextRenderingMode.ClearType, small text</Label>
 5             <Label TextOptions.TextRenderingMode="Grayscale" FontSize="9">TextRenderingMode.Grayscale, small text</Label>
 6             <Label TextOptions.TextRenderingMode="Auto" FontSize="18">TextRenderingMode.Auto, large text</Label>
 7             <Label TextOptions.TextRenderingMode="Aliased" FontSize="18">TextRenderingMode.Aliased, large text</Label>
 8             <Label TextOptions.TextRenderingMode="ClearType" FontSize="18">TextRenderingMode.ClearType, large text</Label>
 9             <Label TextOptions.TextRenderingMode="Grayscale" FontSize="18">TextRenderingMode.Grayscale, large text</Label>
10         </StackPanel>
1         <Canvas>
2             <Ellipse Panel.ZIndex="2" Fill="Gainsboro" Canvas.Left="25" Canvas.Top="25" Width="200" Height="200" />
3             <Rectangle Panel.ZIndex="3" Fill="LightBlue" Canvas.Left="25" Canvas.Top="25" Width="50" Height="50" />
4             <Rectangle Panel.ZIndex="2" Fill="LightCoral" Canvas.Left="50" Canvas.Top="50" Width="50" Height="50" />
5             <Rectangle Panel.ZIndex="4" Fill="LightCyan" Canvas.Left="75" Canvas.Top="75" Width="50" Height="50" />
6         </Canvas>
 1    <DockPanel Margin="40"  >
 2             <ToolBar DockPanel.Dock="Top">
 3                 <Button ToolTip="Create a new file">
 4                     <Button.Content>
 5                         <Image Source="/WpfTutorialSamples;component/Images/page_white.png" Width="16" Height="16" />
 6                     </Button.Content>
 7                 </Button>
 8                 <Button>
 9                     <Button.Content>
10                         <Image Source="/WpfTutorialSamples;component/Images/folder.png" Width="16" Height="16" />
11                     </Button.Content>
12                     <Button.ToolTip>
13                         <StackPanel>
14                             <TextBlock FontWeight="Bold" FontSize="14" Margin="0,0,0,5">Open file</TextBlock>
15                             <TextBlock>
16                         Search your computer or local network
17                         <LineBreak />
18                         for a file and open it for editing.
19                             </TextBlock>
20                             <Border BorderBrush="Silver" BorderThickness="0,1,0,0" Margin="0,8" />
21                             <WrapPanel>
22                                 <Image Source="/WpfTutorialSamples;component/Images/help.png" Margin="0,0,5,0" />
23                                 <TextBlock FontStyle="Italic">Press F1 for more help</TextBlock>
24                             </WrapPanel>
25                         </StackPanel>
26                     </Button.ToolTip>
27                 </Button>
28             </ToolBar>
29 
30             <TextBox>
31                 Editor area...
32             </TextBox>
33         </DockPanel>
原文地址:https://www.cnblogs.com/ants_double/p/5366434.html