首页 > 其他分享 >WPF FlowDocument List ListItem Paragraph BlockUIContainer Table TableRowGroup TableRow TableC

WPF FlowDocument List ListItem Paragraph BlockUIContainer Table TableRowGroup TableRow TableC

时间:2024-09-28 15:45:58浏览次数:6  
标签:TableCell FlowDocument TableRow TableRowGroup BlockUIContainer Table WPF NET

<Window x:Class="WpfApp419.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp419"
        mc:Ignorable="d"
        WindowState="Maximized"
        Title="MainWindow" Height="450" Width="800">
    <FlowDocument>
        <Section LineHeight="2" Foreground="White"
                 Background="Black">
            <Paragraph FontSize="18">WPF 4 Unleashed</Paragraph>
            <Paragraph FontSize="30" FontWeight="Bold">Notes from Chapter 1</Paragraph>
        </Section>
        <Paragraph>Here are some highlights of WPF:</Paragraph>
        <List>
            <ListItem>
                <Paragraph>Broad integration</Paragraph>
            </ListItem>
            <ListItem>
                <Paragraph>
                    Resolution independence
                </Paragraph>
            </ListItem>
            <ListItem>
                <Paragraph>Hardware acceleration</Paragraph>
            </ListItem>
            <ListItem>
                <Paragraph>Declarative programming</Paragraph>
            </ListItem>
            <ListItem>
                <Paragraph>Rich composition and customization</Paragraph>
            </ListItem>
        </List>
        <BlockUIContainer>
            <Viewbox>
                <StackPanel Orientation="Horizontal">
                    <Image Source="Images/1.jpg" Margin="5"/>
                    <TextBlock VerticalAlignment="Center"
                               Width="100"
                               TextWrapping="Wrap">
                        The technologies in the .NET Framewrok.
                    </TextBlock>
                </StackPanel>
            </Viewbox>
        </BlockUIContainer>
        <Paragraph>
            Here's another version of the diagram,as a Table:
        </Paragraph>
        <Table CellSpacing="5" Padding="15" FontFamily="Segoe UI">
            <Table.Background>
                <LinearGradientBrush>
                    <GradientStop Color="Yellow" Offset="0"/>
                    <GradientStop Color="Orange" Offset="1"/>
                </LinearGradientBrush>
            </Table.Background>
            <Table.Columns>
                <TableColumn/>
                <TableColumn/>
                <TableColumn/>
                <TableColumn/>
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                    <TableCell ColumnSpan="4" TextAlignment="Center">
                        <Paragraph FontWeight="Bold">.NET Framework</Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell BorderBrush="Black"
                               BorderThickness="2"
                               Background="LightGray"
                               TextAlignment="Center"
                               LineHeight="70">
                        <Paragraph FontWeight="Bold">WPF</Paragraph>
                    </TableCell>
                    <TableCell BorderBrush="Black" BorderThickness="2" Background="LightGray"
                               TextAlignment="Center">
                        <Paragraph FontWeight="Bold">WCF</Paragraph>
                    </TableCell>
                    <TableCell BorderBrush="Black" BorderThickness="2" Background="LightGray"
                               TextAlignment="Center">
                        <Paragraph FontWeight="Bold">WF</Paragraph>
                    </TableCell>
                    <TableCell BorderBrush="Black" BorderThickness="2" Background="LightGray"
                    TextAlignment="Center">
                        <Paragraph FontWeight="Bold">WCS</Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell BorderBrush="Black" BorderThickness="2"
                               Background="LightGray"
                               TextAlignment="Center">
                        <Paragraph FontWeight="Bold">ADO.NET</Paragraph>
                    </TableCell>
                    <TableCell BorderBrush="Black" BorderThickness="2" Background="LightGray"
                               TextAlignment="Center">
                        <Paragraph FontWeight="Bold">ASP.NET</Paragraph>
                    </TableCell>
                    <TableCell BorderBrush="Black" BorderThickness="2" Background="LightGray"
                               TextAlignment="Center">
                        <Paragraph FontWeight="Bold">Windows Forms</Paragraph>
                    </TableCell>
                    <TableCell BorderBrush="Black" BorderThickness="2" Background="LightGray"
                               TextAlignment="Center">
                        <Paragraph FontWeight="Bold">...</Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
        </Table>
    </FlowDocument>
</Window>

 

 

 

 

 

 

标签:TableCell,FlowDocument,TableRow,TableRowGroup,BlockUIContainer,Table,WPF,NET
From: https://www.cnblogs.com/Fred1987/p/18438038

相关文章

  • WPF FlowDocument Paragraph
    <Windowx:Class="WpfApp418.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft......
  • Flutter 中的 TableCell 小部件:全面指南
    Flutter中的TableCell小部件:全面指南Flutter是一个功能强大的UI框架,由Google开发,允许开发者使用Dart语言构建跨平台的移动、Web和桌面应用。在Flutter的丰富组件库中,TableCell是一个用于创建表格单元格的组件,它提供了灵活的方式来自定义表格的内容和布局。本......
  • 解决使用XDocument操作FlowDocument时XML被格式化的问题
    最近需要对WPF中的FlowDocument进行解析编辑操作,理想的办法是解析成FlowDocument对象,但是有些操作不是很方便。 FlowDocument实际上还是XML,我直接使用XDocument去进行解析操作更方便。如下就是一个FlowDocument的一个段落1<Sectionxmlns="http://schemas.microsoft.com/wi......
  • WPF FlowDocument结构详解
    FlowDocument一、介绍FlowDocument是WPF中的流文档,用来承载大段文章。可以用来显示文章。或者在RichTextBox中编辑文章。FlowDocument没有多少方法,但有大量的属性,用来设置文章的字体,字体大小,前景色,背景色之类的。但这些都没什么特别的,最重要的,是FlowDocument的结构。二、FlowDocum......
  • TableLayout得到TableRow
    for(inti=0,j<table.getChildCount();i<j;i++){//then,youcanremovethetherowyouwant...//forinstance...TableRowrow=getChildAt(i);if(somethingyouwanttocheck){removeViewAt(i);//or.......
  • TableRow 背景问题以及修改对话框标题高度或者图片
    <TableRowxmlns:android="http://schemas.android.com/apk/res/android"android:id="@+id/admin_row"android:layout_width="fill_parent"android:layout_height="wrap_content"......
  • IfcTableRow
    IfcTableRow实体定义IfcTableRow包含IfcTable中单行的数据。 限制:为了向后兼容,IfcTable引用的所有IfcTableRow对象应具有相同数量的行单元格。实际单元格数应取自该表......
  • C#关于微软flowDocument不显示png图片的Bug
    C#关于微软​​flowDocument​​​不显示​​png​​图片的Bug最近再用WPF​​flowDocument​​​做文档。文档中需要引用图片。开始时引入的是​​png​​格式的图片。但是......
  • 微软FlowDocument新Bug
    微软​​FlowDocument​​新Bug上一次我说​​FlowDocument​​不能识别PNG格式图片,然后我把PNG换成JPG,于是解决问题。第二天,win10系统升级,升完级打开项目继续做,发现程序中......
  • WPF 的 FlowDocumentScrollViewer滚动到最底下的方法
    官网上好像并没有直接给相应的接口和方法。发现一种有效的方法:先说方法:ScrollViewersv=flowScrollViewer.Template.FindName("PART_ContentHost",flowScrollViewer)......