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

开县做网站柳江企业网站建设公司

开县做网站,柳江企业网站建设公司,绍兴app定制,邯郸网站开发公司StackPanel堆叠布局 StackPanel是简单布局方式之一#xff0c;可以很方便的进行纵向布局和横向布局 StackPanel默认是纵向布局的 Window x:ClassWpfApplication1.MainWindow xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation …StackPanel堆叠布局 StackPanel是简单布局方式之一可以很方便的进行纵向布局和横向布局 StackPanel默认是纵向布局的 Window x:ClassWpfApplication1.MainWindow xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml TitleMainWindow StackPanel Button Content按钮/Button Button Content按钮/Button Button Content按钮/Button Button Content按钮/Button Label ContentLabel/Label Label ContentLabel/Label Label ContentLabel/Label /StackPanel /Window 如果要横向布局的话只要把StackPanel的Orientation属性设置成Horizontal即可 这个属性的默认值是Vertical Window x:ClassWpfApplication1.MainWindow xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml TitleMainWindow StackPanel OrientationHorizontal Button Content按钮/Button Button Content按钮/Button Button Content按钮/Button Button Content按钮/Button Label ContentLabel/Label Label ContentLabel/Label Label ContentLabel/Label /StackPanel /Window WrapPanel包裹布局 在WrapPanel面板中的元素以一次一行或一列的方式布局控件 WrapPanel也有Orientation属性但与StackPanel不同的是WrapPanel的Orientation属性的默认值是Horizontal 也就是说WrapPanel的默认展现方向是横向的 WrapPanel与StackPanel另一个不同的地方是当容器实际宽度不够的情况下内容将以多行或者多列的形式展现 Window x:ClassWpfApplication1.MainWindow xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml TitleMainWindow WrapPanel Button Contentallen/Button Button Contentallen/Button Button Contentallen/Button Button Contentallen/Button Button Contentallen/Button Button Contentallen/Button /WrapPanel /Window WrapPanel的纵向展现方式 Window x:ClassWpfApplication1.MainWindow xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml TitleMainWindow WrapPanel OrientationVertical Button Contentallen1/Button Button Contentallen2/Button Button Contentallen3/Button Button Contentallen4/Button Button Contentallen5/Button Button Contentallen6/Button Button Contentallen7/Button Button Contentallen8/Button Button Contentallen9/Button Button Contentallen10/Button /WrapPanel /Window DockPanel停靠布局 这种布局把布局容器分为上、下、左、右四个边缘容器内的元素沿着某一个边缘来拉伸自己 Window x:ClassWpfApplication1.MainWindow xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml TitleMainWindow DockPanel !--沿着上边缘拉伸-- Button ContentTop DockPanel.DockTop/Button !--沿着下边缘拉伸-- Button ContentBottom DockPanel.DockBottom/Button !--沿着左边缘拉伸-- Button ContentLeft DockPanel.DockLeft/Button !--沿着右边缘拉伸-- Button ContentRight DockPanel.DockRight/Button !--默认沿着左边缘拉伸-- Button Contentallen5/Button !--默认沿着左边缘拉伸-- Button Contentallen6/Button !--最后一个元素默认填充满整个容器剩余的空间-- Button Content默认最后一个自适应/Button /DockPanel /Window Grid表格布局 Grid布局容器可以把空间分割成多行多列用以摆放不同的控件 Window x:ClassWpfApplication1.MainWindow xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml TitleMainWindow Grid !--定义两行-- Grid.RowDefinitions RowDefinition/RowDefinition RowDefinition/RowDefinition /Grid.RowDefinitions !--定义三列-- Grid.ColumnDefinitions ColumnDefinition/ColumnDefinition ColumnDefinition/ColumnDefinition ColumnDefinition/ColumnDefinition /Grid.ColumnDefinitions !--Grid.Row或 Grid.Column的默认值为0-- Button Content默认在第一行第一列且填充/Button !--如果我把Grid.Row的值设置成2因为没有第三行所以按钮会自动被放在最后一行仍然是第二行-- Button Grid.Row1 Grid.Column1 Content第二行第二列/Button /Grid /Window Canvas画布布局 Canvas画布布局容器允许使用精确的坐标来摆放画布内的元素 如果两个元素共用了同一块区域那么后设置的元素将覆盖先设置的元素 Window x:ClassWpfApplication1.MainWindow xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml TitleMainWindow Canvas Button Canvas.Left100 Canvas.Top100 Content第一个按钮/Button Button Canvas.Left136 Canvas.Top112 Content第二个按钮/Button /Canvas /Window Window窗口 窗口是容纳所有WPF界面元素的最初容器任何的界面元素都要放在Window窗口内才能呈现 WPF窗口只能包含一个儿子控件这是因为Window类继承自ContentControl类。 Window x:ClassWpfApplication1.MainWindow xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml !--你不能在这里放置多个同级元素-- /Window ContentControl就是我们常说的内容控件这种控件与容器控件Grid或StackPanel不同 内容控件的顶级子元素只能有一个容器控件可以包含多个顶级子元素 如果我们想要在一个ContentControl内展示多个子控件 我们可以先放置一个容器控件作为内容控件的顶级子元素然后再在此容器控件中放置更多的控件 Window x:ClassWpfApplication1.MainWindow xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml TitleMainWindow Height350 Width525 Grid Button ContentButton / Button ContentButton / /Grid /Window
http://www.zqtcl.cn/news/887425/

相关文章:

  • 网站空间和数据库多个织梦dedecms网站怎么做站群
  • 网站模块插件是怎么做的个人建设网站流程图
  • 作品展示的网站建设网站方案
  • 整站优化哪家专业网站漏洞解决办法
  • 怎么给自己的网站做扫描码南宁seo排名外包
  • 网站的服务器在哪里怎么建设网站啊
  • 山东做网站三五网站备案怎样提交到管局
  • 自己如何做网站教程中山企业网站推广公司
  • 网站每年费用本地同城服务平台
  • 暗网网站有那些青岛网站设计公司推荐
  • 营业执照咋做网等网站遂宁网站建设公司哪家好
  • 湖南平台网站建设找哪家重庆网站建设营销
  • wordpress搭建企业网站小型网络架构
  • 淘宝联盟链接的网站怎么做培训网站排名
  • 上海高端网站建设定制大连开发区邮编
  • 手机网站公司免费crm软件下载
  • 家居企业网站建设平台周口seo
  • 扁平化网站建设公司广告推广方案
  • 高端企业网站 程序北京做网站费用
  • net做网站遇到的问题搜索引擎优化方法
  • 专业的设计网站有哪些网站数据库做好了 怎么做网页
  • 鄂州网站建设公司网站制作过程教程
  • 网站建设课程小结二建证考试需要什么条件
  • 比较好的商城网站设计品牌策划案
  • 自适应科技公司网站模板做网站的公司深
  • 网站怎么吸引流量用淘宝做公司网站
  • asp做的网站后台怎么进去老河口城乡建设局网站
  • 中铁建设集团有限公司官方网站wordpress质感
  • 那个网站点击率高pc网站自动生成app
  • 东莞营销型网站建站淘金企业网站建设