WPF的textblock实例
<TextBlock Margin="5" TextWrapping="WrapWithOverflow">
4: <TextBlock.Inlines>
5: <Bold>
6: <Run>BlockText 控件XAML示例</Run>
7: </Bold> 8: <LineBreak/>
9: <Run>TextBlock支持以下的几种流显示样式:</Run>
10: <LineBreak/>
11: <Bold>粗体(Bold)</Bold>
<LineBreak/>
13: <Italic>斜体(Italic)</Italic>
14: <LineBreak/>
15: <Underline>下划线(Underline)</Underline>
16: <LineBreak/>
17: <Hyperlink NavigateUri="http://www.microsoft.com">超链接</Hyperlink>
18: <LineBreak/>
19: <Span Foreground="Red" FontSize="18">Span设置字体、颜色等</Span>
20: <LineBreak />
<InlineUIContainer>
22: <StackPanel Background="AntiqueWhite" Margin="5">
23: <TextBlock>Inline UI 容器</TextBlock>
24: <Button Content="按钮" Width="80" />
25: </StackPanel>
26: </InlineUIContainer>
27: </TextBlock.Inlines>
28: </TextBlock>
4: <TextBlock.Inlines>
5: <Bold>
6: <Run>BlockText 控件XAML示例</Run>
7: </Bold> 8: <LineBreak/>
9: <Run>TextBlock支持以下的几种流显示样式:</Run>
10: <LineBreak/>
11: <Bold>粗体(Bold)</Bold>
<LineBreak/>
13: <Italic>斜体(Italic)</Italic>
14: <LineBreak/>
15: <Underline>下划线(Underline)</Underline>
16: <LineBreak/>
17: <Hyperlink NavigateUri="http://www.microsoft.com">超链接</Hyperlink>
18: <LineBreak/>
19: <Span Foreground="Red" FontSize="18">Span设置字体、颜色等</Span>
20: <LineBreak />
<InlineUIContainer>
22: <StackPanel Background="AntiqueWhite" Margin="5">
23: <TextBlock>Inline UI 容器</TextBlock>
24: <Button Content="按钮" Width="80" />
25: </StackPanel>
26: </InlineUIContainer>
27: </TextBlock.Inlines>
28: </TextBlock>
本文使用Blog_Backup未注册版本导出,请到soft.pt42.com注册。