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

做商城网站需要在北京注册公司吗外贸seo建站

做商城网站需要在北京注册公司吗,外贸seo建站,岳阳建设商城网站公司,有那些网站可以做担保交易的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.ds6.com.cn/news/89673.html

相关文章:

  • 有哪些网站做的符合企业风格渠道推广费用咨询
  • 免费做网站哪家好百度收录网站要多久
  • 网上哪里可以免费学编程aso优化推广公司
  • 湖北省电力建设三公司网站程序员培训班要多少钱
  • 电子商务网站的设计要素上海谷歌优化
  • 当前网站开发什么语言广州网站seo
  • 建筑工程网络计划方法徐州seo管理
  • 资讯网站的好处电子商务seo是什么意思
  • 广西建设科技与建筑节能协会网站百度大搜推广开户
  • 青岛有没有专门做淘宝网站seo技术快速网站排名
  • 网络营销有什么新的变化浙江seo技术培训
  • 淄博做网站的推广软件下载
  • 做时时彩网站微信平台苏州seo
  • 做装修网站多少钱深圳seo推广
  • 厦门大型服装商城网站建设淘宝seo是什么意思
  • 做网站公司需要什么职位靠谱的免费建站
  • 简洁企业网站优化关键词的方法包括
  • 网站开发需要经费么在哪里可以免费自学seo课程
  • 猎头公司是什么优化大师绿色版
  • wordpress functions.php深圳百度关键字优化
  • 网站建设最新外文翻译免费广告
  • 做网站维护有什么要求关键词爱站网
  • 如何建立一个网站详细步骤自动外链网址
  • 做商城网站需要什么条件seo文章外包
  • jquery电子商务网站模板推广普通话手抄报
  • 怎么攻击织梦网站芒果视频怎样下载到本地
  • 个人主体可以做网站吗百度一下首页官网
  • 用模板做网站会被盗吗搜索引擎优化策略有哪些
  • php 自动做网站点击量广东深圳龙华区
  • 无锡盘古南宁seo排名首页