当前位置: 首页 > news >正文

建筑工地招工网seo中文全称是什么

建筑工地招工网,seo中文全称是什么,工艺品网站模板,移动端app开发工具StackPanel StackPanel 是一种常用的布局控件,可以支持水平或垂直排列,但不会换行。当子元素添加到 StackPanel 中时,它们将按照添加的顺序依次排列。默认情况下,StackPanel 的排列方向是垂直的,即子元素将从上到下依次排列。可以使用 Orientation 属性更改排列方向。可以…

StackPanel

StackPanel 是一种常用的布局控件,可以支持水平或垂直排列,但不会换行。当子元素添加到 StackPanel 中时,它们将按照添加的顺序依次排列。默认情况下,StackPanel 的排列方向是垂直的,即子元素将从上到下依次排列。可以使用 Orientation 属性更改排列方向。可以设置两种排列方式:横排(Horizontal)和竖排(Vertical,默认)。水平排列时,每个元素都与面板一样高;垂直排列时,每个元素都与面板一样宽。

StackPanel 的Orientation属性

1.默认情况下Orientation="Vertical",<StackPanel Orientation="Vertical">与下方加粗字体是同一个效果 

// StackPanel 里添加了4个按钮,默认布局,Orientation 默认垂直排列
<Window x:Class="WpfFirstApp.StackPanelWindow"
        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:WpfFirstApp"
        mc:Ignorable="d"
        Title="StackPanelWindow" Height="450" Width="800">
    <StackPanel >
        <Button Content="按钮1"></Button>
        <Button Content="按钮2"></Button>
        <Button Content="按钮3"></Button>
        <Button Content="按钮4"></Button>
    </StackPanel>
</Window>

效果图:

也可不在xaml中增加button,改用代码增加;效果是一样的,C#中代码如下:

// 使用C# 代码直接实现
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WpfFirstApp
{
    /// <summary>
    /// StackPanelWindow.xaml 的交互逻辑
    /// </summary>
    public partial class StackPanelWindow : Window
    {
        public StackPanelWindow()
        {
            InitializeComponent();
            this.Title = "StackPanel面板";
            // StackPanel 默认排列
            StackPanel stackPanel = new StackPanel();
            this.Content = stackPanel;
            stackPanel.Children.Add(new Button(){Content="按钮1"});
            stackPanel.Children.Add(new Button(){Content = "按钮2"});
            stackPanel.Children.Add(new Button(){Content = "按钮3"});
            stackPanel.Children.Add(new Button(){Content = "按钮4"});
        }
    }
}

2.设置StackPanel的Orientation为横向(Horizontal)排列

// 设置 Orientation 属性(Horizontal)
<Window x:Class="WpfFirstApp.StackPanelWindow"
        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:WpfFirstApp"
        mc:Ignorable="d"
        Title="StackPanelWindow" Height="450" Width="800">
    <StackPanel Orientation="Horizontal">
        <Button Content="按钮1"></Button>
        <Button Content="按钮2"></Button>
        <Button Content="按钮3"></Button>
        <Button Content="按钮4"></Button>
    </StackPanel>
</Window>

效果图:

也可不在xaml中增加button,改用代码增加;效果是一样的,C#中代码如下:

// 使用C# 代码直接实现
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WpfFirstApp
{
    /// <summary>
    /// StackPanelWindow.xaml 的交互逻辑
    /// </summary>
    public partial class StackPanelWindow : Window
    {
        public StackPanelWindow()
        {
            InitializeComponent();
            this.Title = "StackPanel面板";
            // StackPanel 默认排列
            StackPanel stackPanel = new StackPanel();

            stackPanel.Orientation = Orientation.Horizontal;
            this.Content = stackPanel;
            stackPanel.Children.Add(new Button(){Content="按钮1"});
            stackPanel.Chil

http://www.hkea.cn/news/47527/

相关文章:

  • 南阳建设网站制作网络最有效的推广方法
  • 纯静态网站seoseo排名优化北京
  • 开封网站建设哪家好指数计算器
  • 网站开发 架构石家庄seo关键词排名
  • 可以免费做商业网站的cms百度seo霸屏软件
  • 哪家网站建设专业快速建站教程
  • 坪山网站建设行业现状优化seo方案
  • 做网站需要架构师吗网站平台有哪些
  • 网站建设丿选择金手指15凡科建站官网
  • 可以做外国网站文章武汉企业seo推广
  • 天津网站建设公司最好太原做网站哪家好
  • 网站代下单怎么做百度指数数据分析平台入口
  • 淘宝做动效代码的网站seo的优化方向
  • 番禺建网站公司网站搜索工具
  • 安徽万振建设集团网站长春网站推广公司
  • 网站怎么制作 推广seo超级外链工具免费
  • 中小学网站建设探讨东莞seo整站优化火速
  • php是网站开发的语言吗企业网站的作用
  • 网站站外优化怎么做企业推广app
  • 拉趣网站是谁做的威海网站制作
  • 做宣传海报的网站百度导航2023年最新版
  • 湖南做网站 磐石网络windows优化大师官方免费
  • 制作网站的最新软件如何优化关键词的方法
  • 东莞工作招聘网最新招聘搜索 引擎优化
  • 宁波俄语网站建设免费发广告的平台有哪些
  • 郑州外贸网站建设及维护营销软件商城
  • 泉州百度关键词排名广州网站营销优化qq
  • 怎么做wep网站营销推广活动方案
  • 展示型网站php官方app下载安装
  • 嘉祥网站建设广东省自然资源厅