Silverlight中Grid如何显示边框线

Silverlight中Grid如何显示边框线,第1张

使用手工定义的方式实现显示Grid边框线

<UserControl

    x:Class="SilverlightApplicationGridBorderSample.MainPage"

    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"

    mc:Ignorable="d"

    d:DesignHeight="300"

    d:DesignWidth="400">

    <Grid

        x:Name="LayoutRoot"

        Background="White">

        

        <Grid.Resources>

            <Style

                TargetType="TextBlock">

                <Setter

                    Property="FontSize"

                    Value="30"></Setter>

                <Setter

                    Property="VerticalAlignment"

                    Value="Center"></Setter>

            </Style>

            <Style

                TargetType="Border">

                <Setter

                    Property="BorderBrush"

                    Value="LightGray"></Setter>

                <Setter

                    Property="BorderThickness"

                    Value="1"></Setter>

            </Style>

        </Grid.Resources>

        

        <Grid.RowDefinitions>

            <RowDefinition></RowDefinition>

            <RowDefinition></RowDefinition>

        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>

            <ColumnDefinition></ColumnDefinition>

            <ColumnDefinition></ColumnDefinition>

        </Grid.ColumnDefinitions>

        <TextBlock

            Text="左上角"></TextBlock>

        <TextBlock

            Text="左下角"

            Grid.Row="1"></TextBlock>

        <TextBlock

            Text="右上角"

            Grid.Column="1"></TextBlock>

        <TextBlock

            Text="右下角"

            Grid.Row="1"

            Grid.Column="1"></TextBlock>

        

        <!--添加4个边框-->

        <Border></Border>

        <Border

            Grid.Row="1"></Border>

        <Border

            Grid.Column="1"></Border>

        <Border

            Grid.Row="1"

            Grid.Column="1"></Border>

    </Grid>

表格怎么添加线条。方法如下:

1.选中单元格区域,右键选择设置单元格格式,选择边框,点击添加线条即可。

2.选中单元格区域,点击工具栏中边框按钮,选择添加线条即可。

3.选中单元格区域,点击菜单中格式按钮,选择边框,点击添加线条即可。

拓展资料:

表格,又称为表,既是一种可视化交流模式,又是一种组织整理数据的手段。人们在通讯交流、科学研究以及数据分析活动当中广泛采用着形形色色的表格。各种表格常常会出现在印刷介质、手写记录、计算机软件、建筑装饰、交通标志等许许多多地方。随着上下文的不同,用来确切描述表格的惯例和术语也会有所变化。此外,在种类、结构、灵活性、标注法、表达方法以及使用方面,不同的表格之间也炯然各异。在各种书籍和技术文章当中,表格通常放在带有编号和标题的浮动区域内,以此区别于文章的正文部分。

材料/工具:Origin软件

1、打开Origin软件,新建工作薄,导入数据。

2、选择A和B两列数据绘制点线图。

3、双击Y轴,d出属性框。

4、选择Grid Lines,显示网格线的所有属性。

5、先绘垂直网格线,按照图的标识进行 *** 作,勾选框打勾后,可更改网格线的颜色。最后点Apply应用所选择的属性。

6、按照第5步骤进行平行网格线的绘制。

7、平行网格线和垂直网格线添加完毕。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11815760.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-18
下一篇 2023-05-18

发表评论

登录后才能评论

评论列表(0条)

保存