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

wordpress外贸建站百度pc网页版入口

wordpress外贸建站,百度pc网页版入口,西安建设科技专修学院官方网站,大连在哪里个省份一言蔽之,Template就是“外衣”—— ControlTemplate是控件的外衣, DataTemplate是数据的外衣。 DataTemplate 它定义了一个数据对象的可视化结构 DataTemplate常用的地方有3处,分别是: ContentControl的ContentTemplate属性&…

一言蔽之,Template就是“外衣”——
ControlTemplate是控件的外衣,
DataTemplate是数据的外衣。
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

DataTemplate 它定义了一个数据对象的可视化结构

DataTemplate常用的地方有3处,分别是:

ContentControl的ContentTemplate属性,相当于给ContentControl的内容穿衣服。
ItemsControl的 ItemTemplate属性,相当于给ItemsControl的数据条目穿衣服。
GridViewColumn的CellTemplate属性,相当于给GridViewColumn单元格里的数据穿衣服。

 <ItemsControl ItemsSource="{Binding xxx}"><ItemsControl.ItemTemplate><DataTemplate><Grid><Grid.ColumnDefinitions><ColumnDefinition></ColumnDefinition><ColumnDefinition></ColumnDefinition></Grid.ColumnDefinitions><TextBlock Text="{}"></TextBlock><TextBlock Text="{}"></TextBlock></Grid></DataTemplate></ItemsControl.ItemTemplate></ItemsControl>

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Style

为了让同一种控件能担当起不同的角色,程序员就要为它们设计多种外观样式和行为动作,这就是Style。
构成Style最重要的两种元素是Setter和Trigger,Setter类帮助我们设置控件的静态外观风格,Trigger类则帮助我们设置控件的行为风格。

<Window x:Class="Demo7._3.WpfStyle.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:Demo7._3.WpfStyle"mc:Ignorable="d"Title="MainWindow" Height="450" Width="800"><Window.Resources><Style x:Key="myBtnStyle" TargetType="Button"><Style.Setters><Setter Property="Background" Value="AliceBlue"/><Setter Property="Height" Value="50"/></Style.Setters></Style><Style TargetType="CheckBox"><Style.Triggers><Trigger Property="IsChecked" Value="True"><Trigger.Setters><Setter Property="Foreground" Value="Red"/></Trigger.Setters></Trigger></Style.Triggers></Style></Window.Resources><StackPanel><Button Style="{StaticResource myBtnStyle}"/><CheckBox Content="测试触发器"/></StackPanel>
</Window>

》》》添加触发器

<Window x:Class="Demo7._3.WpfStyle.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:Demo7._3.WpfStyle"mc:Ignorable="d"Title="MainWindow" Height="450" Width="800"><Window.Resources><Style x:Key="myBtnStyle" TargetType="Button"><Style.Setters><Setter Property="Background" Value="AliceBlue"/><Setter Property="Height" Value="50"/></Style.Setters></Style><Style TargetType="CheckBox"><Style.Triggers><MultiTrigger><MultiTrigger.Conditions><Condition Property="IsChecked" Value="True"/><Condition Property="Content" Value="测试触发器"/></MultiTrigger.Conditions><MultiTrigger.Setters><Setter Property="Foreground" Value="Green"/></MultiTrigger.Setters></MultiTrigger></Style.Triggers></Style></Window.Resources><StackPanel><Button Style="{StaticResource myBtnStyle}"/><CheckBox Content="测试触发器"/></StackPanel>
</Window>

》》ControlTemplate
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

http://www.hrbkazy.com/news/12018.html

相关文章:

  • 登陆美国网站做报价单 网速慢下载百度app最新版到桌面
  • 可以接项目做的网站服务器域名怎么注册
  • 政府网站建设和管理办法网站的优化从哪里进行
  • 公司注销需要多少钱费用?百度seo是啥
  • jsp企业网站开发毕业论文西安网站建设维护
  • 汉中商城网站建设品牌推广渠道有哪些
  • 郑州网站策划个人发布信息免费推广平台
  • 网页设计分为哪些板块好的seo公司营销网
  • 江苏建设人才网站it培训学校
  • 哪些网站可以做问卷调查赚钱百度搜图
  • 网站接入查询销售清单软件永久免费版
  • 用wordpress复制一个网站搜索引擎入口大全
  • 公司网站做门户备案关键词排名网站
  • 通过模板做网站电商网站订烟平台官网
  • 做产品推广哪个网站好seo推广价格
  • 濮阳微信网站开发免费使用seo软件
  • 网页网站开发公司网络营销网站设计
  • 武汉网站建设公司 排名如何免费推广网站
  • 判断网站cmsqq刷赞网站推广快速
  • 网站建设 大纲新乡seo公司
  • 泉州厦门网站建设公司天津企业seo
  • ui设计培训课程seo点击排名器
  • ecs服务器 做网站营销推广计划书
  • 武汉网站建设报价明细表深圳网络推广渠道
  • 电子商务网站功能特点搜索引擎营销例子
  • 用extjs做的网站营销策划与运营公司
  • 美国网站建设南昌seo报价
  • 有没有专门做名片的网站什么建站程序最利于seo
  • 曰本真人做爰下载网站商丘seo
  • 自己做时时彩网站网站seo关键词排名查询