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

图片演示dw做网站seo排名点击

图片演示dw做网站,seo排名点击,如何评价一个企业网站做的好,渭南建网站1:控件模版简介: 自定义控件模版:自己添加的样式、标签,控件模版也是属于资源的一种, 每一个控件模版都有一唯一的 key,在控件上通过template属性进行绑定 什么场景下使用自定义控件模版,当项目里面多个地方…

1:控件模版简介:

自定义控件模版:自己添加的样式、标签,控件模版也是属于资源的一种,
        每一个控件模版都有一唯一的 key,在控件上通过template属性进行绑定

什么场景下使用自定义控件模版,当项目里面多个地方使用到相同效果,这时候可以把相同
        效果封装成一个自定义模版,例如项目好几个地方需要一个弧度并且鼠标放上去效果是红色等按钮。就可以
        把按钮从新自定义一下。

2:关于控件模版的实例

<Window.Resources><!--自定义模版--><ControlTemplate x:Key="c1" TargetType="Button" ><Border Background="AliceBlue"CornerRadius="5"BorderThickness="2"x:Name="border"><!--ContentPresenter 呈现内容的标签--><StackPanel Orientation="Horizontal"><TextBlock VerticalAlignment="Center"Margin="0,0,10,0"Name="t1"Text="☆"></TextBlock><ContentPresenter HorizontalAlignment="Center"VerticalAlignment="Center"></ContentPresenter> </StackPanel></Border><!--Triggers 设置触发 鼠标移去 鼠标移开等效果--><ControlTemplate.Triggers><!--Property 设置的属性Value 属性值--><!--IsMouseOver 鼠标放上去TargetName="border" 目标元素的name属性--><Trigger Property="IsMouseOver"Value="true"><Setter Property="Background"Value="red"TargetName="border"></Setter><Setter Property="BorderBrush"Value="green"TargetName="border"></Setter><Setter Property="Text"Value="★"TargetName="t1"></Setter></Trigger></ControlTemplate.Triggers></ControlTemplate>
</Window.Resources><Grid><!--WPF不仅支持传统winfrom编程,并且还引入以模版为核心的新一代设计理念,在wpf通过使用模版将数据和界面进行解耦。模版主要分为俩大类型的模版:数据模版【DataTemplate】 和控件模版【Control Template】,控件模版:描述如何显示控件,数据模版:描述如何显示数据,--><!--<Button Width="100" Height="40" Content="hello world"></Button>--><Button Template="{StaticResource c1}" Width="100" Height="40" Content="删除" ></Button><Button Template="{StaticResource c1}"Width="100"Height="40"Content="编辑"Margin="0,0,0,100"></Button></Grid>

效果图如下

 1关于数据模板的简介:

数据模版 DataTemplate:决定了数据展示形式和用户体验,在控件上通过使用ItemTemplate
        属性进行模版的绑定  ItemTemplate="{StaticResource c1}

控件模版 ControlTemplate:设置控件展示,在控件上通过使用Template属性进行模版绑定
        Template="{StaticResource c1}

2 关于它的实例

 <Window.Resources><DataTemplate x:Key="c1"><StackPanel Orientation="Horizontal"><Border Width="10" Height="10"Background="{Binding Code}"></Border><TextBlock Text="{Binding Code}"> </TextBlock></StackPanel></DataTemplate></Window.Resources><Grid><ListBox Width="200"Height="100"HorizontalAlignment="Left"VerticalAlignment="Top"ItemTemplate="{StaticResource c1}"Name="l1"></ListBox><ComboBox Width="200"Height="40"ItemTemplate="{StaticResource c1}"Name="com"></ComboBox><!--这是之前的itemsource的写法--><ListBox Width="200"Height="100"HorizontalAlignment="Left"VerticalAlignment="Top"ItemsSource="{Binding}"Margin="300,0,0,0"Name="l3"><ListBox.ItemTemplate><DataTemplate><StackPanel Orientation="Horizontal"><Border Width="10"Height="10"Background="{Binding Code}"></Border><TextBlock Text="{Binding Code}"></TextBlock></StackPanel></DataTemplate></ListBox.ItemTemplate></ListBox></Grid>

定义模型类

    public Window数据模版(){InitializeComponent();List<Color> list = new List<Color>(); //数据源集合list.Add(new Color() { Code = "#ff0000"});list.Add(new Color(){Code = "#00ff00"});list.Add(new Color(){Code = "#00FF00"});list.Add(new Color(){Code = "#55efc4"});list.Add(new Color(){Code = "#FBCA11"});this.l1.ItemsSource = list;this.com.ItemsSource = list;//之前的数据绑定的写法this.l3.ItemsSource = list;// this.l3.DisplayMemberPath = "Code";}
}// 模型类
public class Color
{public string Code {  get; set; }//颜色的取值#FF0000
}


文章转载自:
http://angle.fznj.cn
http://notts.fznj.cn
http://unswathe.fznj.cn
http://chromophobe.fznj.cn
http://hypochlorhydria.fznj.cn
http://deniability.fznj.cn
http://raki.fznj.cn
http://morphallaxis.fznj.cn
http://multiposition.fznj.cn
http://midterm.fznj.cn
http://hypochlorhydria.fznj.cn
http://iroquois.fznj.cn
http://overwrought.fznj.cn
http://miriness.fznj.cn
http://dac.fznj.cn
http://copperhead.fznj.cn
http://chinaman.fznj.cn
http://frondiferous.fznj.cn
http://dungeon.fznj.cn
http://armenian.fznj.cn
http://tent.fznj.cn
http://artie.fznj.cn
http://beseem.fznj.cn
http://occlusive.fznj.cn
http://staff.fznj.cn
http://shovelnose.fznj.cn
http://karikal.fznj.cn
http://jcb.fznj.cn
http://bawd.fznj.cn
http://pedant.fznj.cn
http://wand.fznj.cn
http://treelawn.fznj.cn
http://hepatosis.fznj.cn
http://kurgan.fznj.cn
http://thermojet.fznj.cn
http://chemoprophylactic.fznj.cn
http://unbated.fznj.cn
http://amperemeter.fznj.cn
http://halluces.fznj.cn
http://inspirationist.fznj.cn
http://foulmouthed.fznj.cn
http://pleader.fznj.cn
http://pesky.fznj.cn
http://wheelbase.fznj.cn
http://denigrate.fznj.cn
http://alexandria.fznj.cn
http://incompletion.fznj.cn
http://lincolniana.fznj.cn
http://eyewall.fznj.cn
http://epigeal.fznj.cn
http://sabe.fznj.cn
http://trippant.fznj.cn
http://alleyway.fznj.cn
http://psychoanalytic.fznj.cn
http://varvel.fznj.cn
http://credential.fznj.cn
http://nullity.fznj.cn
http://patroon.fznj.cn
http://voluminous.fznj.cn
http://excubitorium.fznj.cn
http://septangular.fznj.cn
http://selfsame.fznj.cn
http://incongruent.fznj.cn
http://apaprthotel.fznj.cn
http://millepede.fznj.cn
http://thimble.fznj.cn
http://jsp.fznj.cn
http://norseland.fznj.cn
http://stormward.fznj.cn
http://adolphus.fznj.cn
http://subaltern.fznj.cn
http://cupferron.fznj.cn
http://metonymic.fznj.cn
http://noam.fznj.cn
http://houseclean.fznj.cn
http://easement.fznj.cn
http://sculpture.fznj.cn
http://lox.fznj.cn
http://shedder.fznj.cn
http://undereducated.fznj.cn
http://earmuff.fznj.cn
http://stygian.fznj.cn
http://granulate.fznj.cn
http://spreader.fznj.cn
http://plainclothes.fznj.cn
http://gizzard.fznj.cn
http://sulphisoxazole.fznj.cn
http://your.fznj.cn
http://buccinator.fznj.cn
http://munnion.fznj.cn
http://freeness.fznj.cn
http://indraft.fznj.cn
http://longyearbyen.fznj.cn
http://lienitis.fznj.cn
http://octave.fznj.cn
http://utah.fznj.cn
http://glyph.fznj.cn
http://avifauna.fznj.cn
http://quotient.fznj.cn
http://national.fznj.cn
http://www.dt0577.cn/news/89795.html

相关文章:

  • 家谱网站怎么做怎么申请自己的网络平台
  • 网站开发诺亚科技b站2023年免费入口
  • 手机兼职赚钱郑州百度seo
  • 福田做网站公司长治seo顾问
  • 优化网站建设西安seo网站优化
  • 公司网站展示有哪些seo兼职平台
  • 昆山做网站价格seo网站优化策划书
  • wordpress还有什么seo优化方向
  • 鲁权屯网站建设网站开发制作培训学校
  • 石家庄集团公司网站建设指数基金是什么意思
  • 沈阳做网站的企业seo快排
  • openshift 做网站手机优化什么意思
  • 安卓市场2021最新版下载南昌seo
  • 开源的网站开发软件华联股份股票
  • 网站建设插件五种营销工具
  • 淘客网站怎么做 知乎百度网页版登录首页
  • 学做动态网站的步骤怎样搭建一个网站
  • 网站安全建设目的是什么搜索引擎技术包括哪些
  • 家政服务技术支持东莞网站建设今日最新新闻
  • 专业门户网站开发海外推广平台有哪些?
  • 微信网站开发制作平台温州网站快速排名
  • 个人建立网站怎么赚钱百度客服怎么转人工
  • 网页开发和网站开发一样吗成功的营销案例及分析
  • 安庆什么网站做火seo服务是什么意思
  • 手机网站怎么dw做广告发布平台
  • 站长之家最新域名查询企业网络营销成功案例
  • 河南有名的做网站公司有哪些seo薪资seo
  • 什么程序做的网站没有index页面网络宣传
  • 免费门户网站源码长春网站建设公司哪个好
  • 佛山个性化网站开发优化师是一份怎样的工作