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

德化县住房和城乡建设局网站东道设计地址

德化县住房和城乡建设局网站,东道设计地址,7有免费建网站,温州哪里有做网站的《深入浅出WPF》读书笔记.11Template机制(上) 背景 模板机制用于实现控件数据算法的内容与外观的解耦。 《深入浅出WPF》读书笔记.11Template机制(上) 模板机制 模板分类 数据外衣DataTemplate 常用场景 事件驱动和数据驱动的区别 示例代码 使用DataTemplate实现数据样式…《深入浅出WPF》读书笔记.11Template机制(上) 背景 模板机制用于实现控件数据算法的内容与外观的解耦。 《深入浅出WPF》读书笔记.11Template机制(上) 模板机制 模板分类 数据外衣DataTemplate 常用场景 事件驱动和数据驱动的区别 示例代码 使用DataTemplate实现数据样式 Window x:ClassTemplateDemo.DataTemplateViewxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:TemplateDemomc:IgnorabledTitleDataTemplateView Height450 Width800Window.Resourceslocal:AutoMaker2PhotoPathConverter x:Keya2p/local:AutoMaker2PhotoPathConverterlocal:Name2PhotoPathConverter x:Keyn2p/local:Name2PhotoPathConverterDataTemplate x:KeydetailTemplateBorder BorderBrushBlack BorderThickness1 CornerRadius6StackPanel Margin5Image x:Nameimg1 Height250 Width400 Source{Binding Name,Converter{StaticResource n2p}}/ImageStackPanel OrientationHorizontalTextBlock TextName: FontSize25 FontWeightBold/TextBlockTextBlock x:NametblName FontSize25 FontWeightBold Text{Binding Name}/TextBlock/StackPanelStackPanel OrientationHorizontalTextBlock TextAutoMaker: Margin5/TextBlockTextBlock x:NametblAutoMaker Margin5 Text{Binding AutoMaker}/TextBlockTextBlock TextYear: Margin5/TextBlockTextBlock x:NametblYear Margin5 Text{Binding Year}/TextBlockTextBlock TextTopSpeed:: Margin5/TextBlockTextBlock x:NametblTopSpeed Margin5 Text{Binding TopSpeed}/TextBlock/StackPanel/StackPanel/Border/DataTemplateDataTemplate x:KeycarListItemBorder BorderBrushBlack CornerRadius6 BorderThickness1StackPanel Margin5 OrientationHorizontalImage Source{Binding Name,Converter{StaticResource n2p}} Width64 Height64/ImageStackPanelTextBlock Text{Binding Name}/TextBlockTextBlock Text{Binding Year}/TextBlock/StackPanel/StackPanel/Border/DataTemplate/Window.ResourcesGridGrid.ColumnDefinitionsColumnDefinition Width200*/ColumnDefinitionColumnDefinition Width100*/ColumnDefinition/Grid.ColumnDefinitionsUserControl x:NameucCarDetail Grid.Column0 ContentTemplate{StaticResource detailTemplate} Content{Binding ElementNamelistBoxCar,PathSelectedItem}/UserControlListBox x:NamelistBoxCar Grid.Column1 ItemTemplate{StaticResource carListItem}/ListBox/Grid /Windowusing 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 TemplateDemo {/// summary/// DataTemplateView.xaml 的交互逻辑/// /summarypublic partial class DataTemplateView : Window{public DataTemplateView(){InitializeComponent();GetCarData();}public void GetCarData(){ListCar cars new ListCar(){new Car{Nameavatar1,Year1998,AutomakerCN,TopSpeed300},new Car{Nameavatar2,Year1999,AutomakerCN,TopSpeed350},new Car{Nameavatar3,Year2000,AutomakerCN,TopSpeed400}};this.listBoxCar.ItemsSource cars;}} }using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data;namespace TemplateDemo {public class L2BConver : IValueConverter{public object Convert(object value, Type targetType, object parameter, CultureInfo culture){return (int)value 6 ? true : false;}public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture){throw new NotImplementedException();}} }代码说明 控件外衣ContentTemplate 用途 使用blend观看控件内部 Window x:ClassTemplateDemo.ControlTemplatexmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:TemplateDemomc:IgnorabledTitleControlTemplate Height300 Width400Window.ResourcesStyle x:KeyRoundCornerTextBox BasedOn{x:Null} TargetTypeTextBoxSetter PropertyTemplateSetter.ValueControlTemplate TargetTypeTextBoxBorder CornerRadius5 x:Namebd SnapsToDevicePixelsTrueBorderBrush{TemplateBinding BorderBrush} BorderThickness{TemplateBinding BorderThickness} Background{TemplateBinding Background}ScrollViewer x:NamePART_ContentHost SnapsToDevicePixels{TemplateBinding SnapsToDevicePixels}/ScrollViewer/Border/ControlTemplate/Setter.Value/Setter/Style/Window.ResourcesWindow.BackgroundLinearGradientBrush StartPoint0.5,0 EndPoint0.5,1GradientStop ColorOrange Offset0/GradientStopGradientStop ColorWhite Offset1/GradientStop/LinearGradientBrush/Window.BackgroundStackPanelTextBox Width120 Height40 Style{StaticResource RoundCornerTextBox} BorderBrushBlack Margin5/TextBoxTextBox Width120 Height40 Style{StaticResource RoundCornerTextBox} BorderBrushBlack Margin5/TextBoxButton Width120 Height40 Content点击一下 Margin5/Button/StackPanel /WindowWindow x:ClassTemplateDemo.PanelTemplatexmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:TemplateDemomc:IgnorabledTitlePanelTemplate Height450 Width800GridListBoxListBox.ItemsPanelItemsPanelTemplateStackPanel OrientationVertical/StackPanel /ItemsPanelTemplate/ListBox.ItemsPanelTextBlock Text郭靖/TextBlockTextBlock Text黄蓉/TextBlockTextBlock Text杨康/TextBlockTextBlock Text穆念慈/TextBlock/ListBox/Grid /WindowGit地址 GitHub - wanghuayu-hub2021/WpfBookDemo: 深入浅出WPF的demo
http://www.hkea.cn/news/14282471/

相关文章:

  • 明年做那个网站能致富中国建设协会官网证件查询
  • 网站广告投放价格表广西建设厅考试网站首页
  • 网站排名必做阶段性seo策略获取更多付费流量
  • 湖南土特产销售网网站建设制作dede投票类网站源码
  • 如何在外管局网站做延期收汇鲁班设计远程工作
  • 贸易公司寮步网站建设哪家好信息流广告案例
  • 海外社交网站开发推广普通话的文章
  • 外贸如何建立网站企业网站的页面信息该如何排放
  • 义乌婚介网站建设杭州电商网站建设公司
  • 关于国家对网站建设临沂网站制作计划
  • 广州网站建设快速排名公众号怎么弄好看的模板
  • 企业网站设计seo中国电信网站备案流程
  • 贵州网站开发百度推广竞价排名
  • 福州网站建设模板网站建设目标有哪几个方面
  • 平邑网站建设龙岩seo外包公司
  • vs做的网站排版错位国外的跨境电商平台有哪些
  • 打开网站很慢wordpress m1 cms
  • 专业制作假行驶证nginx wordpress优化
  • 惠州 光电 网站上线优秀网站案例
  • app网站开发后台处理数据网站建设成本
  • 广州犀牛云网站建设贵州省水利建设管理总站网站
  • 长沙市建设厅官方网站织梦与wordpress
  • 济南网站优化技术厂家网站开发 实时更新
  • 网站 dns 解析商业信息发布平台
  • iis服务器的默认网站凡科网登录下载
  • 湖南网站托管湖南郴州市房价
  • 做爰免费网站机关单位不得建设网站
  • 如何做代刷网站内部优化
  • 北京网站建设百度排名12306网站开发过程
  • 威县做网站多少钱如何通过网站后台修改网站