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

网络营销人员招聘信息wordpress国内优化 墙

网络营销人员招聘信息,wordpress国内优化 墙,江西网站备案要求,一小时学会网站建设为 ListView 控件的内容指定视图模式的方法#xff0c;参考官方文档。 ComboBox 样式和模板 案例说明#xff1a;通过checkBox和ComboBox的组合方式实现下拉窗口的多选方式#xff0c;同时说明了ListView中Items项目的两种绑定方式. 示例#xff1a; 设计样式 Xaml代码…为 ListView 控件的内容指定视图模式的方法参考官方文档。 ComboBox 样式和模板 案例说明通过checkBox和ComboBox的组合方式实现下拉窗口的多选方式同时说明了ListView中Items项目的两种绑定方式. 示例 设计样式 Xaml代码  Window x:ClassComboBox自定义多选.MainWindowxmlnshttp://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:ComboBox自定义多选xmlns:hchttps://handyorg.github.io/handycontrol mc:IgnorabledTitleMainWindowHeight450Width800BackgroundDarkGrayGridGrid.ColumnDefinitionsColumnDefinition Width300/ColumnDefinitionColumnDefinition/ColumnDefinition/Grid.ColumnDefinitionsStackPanel!-- 定义多选ComboBox --ComboBox NamemultiSelectComboBoxWidth200Height30HorizontalAlignmentLeft IsEditableTrueStaysOpenOnEditTrueIsReadOnlyTrueText多选列表Margin10!-- 定义ComboBox的ItemTemplate包含一个CheckBox --ComboBox.ItemTemplateDataTemplateCheckBox Content{Binding Name}IsChecked{Binding IsSelected, ModeTwoWay} //DataTemplate/ComboBox.ItemTemplate/ComboBox!-- 按钮显示所选项目 --Button Content查看选择了什么选项Width170Height30VerticalAlignmentTopHorizontalAlignmentLeftMargin10ClickShowSelectedOptions_Click /TextBlock NameSelectItemsMargin10/TextBlock/StackPanelWrapPanel Grid.Column1ListView NameStudentList Margin10ListView.ViewGridViewGridViewColumn Header姓名 Width200DisplayMemberBinding{Binding Name}/GridViewColumnGridViewColumn Header年龄Width200DisplayMemberBinding{Binding Age}/GridViewColumn/GridView/ListView.View/ListViewButton NameMode1Margin10HorizontalAlignmentLeftContent方式一ClickMode1_Click/ButtonButton NameMode2Margin10HorizontalAlignmentLeftContent方式二ClickMode2_Click/Button/WrapPanel/Grid /WindowCS代码  using System.Collections.ObjectModel; using System.Text; 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.Navigation; using System.Windows.Shapes;namespace ComboBox自定义多选 {/// summary/// Interaction logic for MainWindow.xaml/// /summarypublic partial class MainWindow : Window{public ObservableCollectionStudent Items { get; set; }public MainWindow(){InitializeComponent();// 初始化选项集合Items new ObservableCollectionStudent{new Student { Name 张三, Age 20},new Student { Name 李四, Age 21},new Student { Name 王五, Age 22},new Student { Name 赵六, Age 23}};// 将Items集合绑定到ComboBox的ItemsSourcemultiSelectComboBox.ItemsSource Items; }// 显示已选择的选项private void ShowSelectedOptions_Click(object sender, RoutedEventArgs e){// 获取所有IsSelected为true的项目var selectedItems Items.Where(item item.IsSelected).Select(item item.Name).ToList();// 显示选择的项目SelectItems.Text 你选择了: string.Join(, , selectedItems);}// 数据项类public class Student{public string? Name { get; set; }public string? Age { get; set; }public bool IsSelected { get; set; }}private void Mode1_Click(object sender, RoutedEventArgs e){StudentList.Items.Clear();// 初始化选项集合Items new ObservableCollectionStudent{new Student { Name 张三, Age 20},new Student { Name 李四, Age 21},new Student { Name 王五, Age 22},new Student { Name 赵六, Age 23}};// 将Items集合绑定到ListView的ItemsSourceStudentList.ItemsSource Items;}private void Mode2_Click(object sender, RoutedEventArgs e){StudentList.ItemsSource null;StudentList.Items.Clear();StudentList.Items.Add(new Student { Name 孙悟空, Age 10000 });StudentList.Items.Add(new Student { Name 悟能, Age 5000 });StudentList.Items.Add(new Student { Name 悟净, Age 3000 });StudentList.Items.Add(new Student { Name 唐僧, Age 30 });}} } 使用效果展示 启动页面 点击“方式一” 点击“方式二” 查看多选框的下拉菜单 选择两个项目 点击“查看选择了什么选项”
http://www.hkea.cn/news/14293071/

相关文章:

  • 静态网站如何共用一个头部和尾部如何选择网站公司
  • 单位如何建设网站wordpress 开店
  • 公司建设网站申请潮阳网站建设公司
  • 电商网站开发实训心得广西造建设工程协会网站
  • 顾氏网站建设有限公司怎么样太原网页设计师招聘信息
  • 在线简历制作网站免费wordpress 获取分类别名
  • 论mvc框架在网站开发的应用宿州房产网
  • 做网站每一年都要交钱吗顺德龙江做网站
  • 网站门户是什么意思外贸原单是什么意思
  • 太原网站建设开发公司wordpress 图片域名
  • 子域名的网站放到哪里去徐汇建设机械网站
  • 如何申请一个网站 做视频直播wordpress2345
  • 前端网站开发实例视频wordpress 链接提交表单
  • wordpress 增加站长统计高端外贸网站建设
  • 设计风格好看的网站动漫网站建设
  • 网站空间到期怎么办网站建设与维护 东博
  • 游戏网站网页设计东莞华为外包公司
  • 网站建设经典文章网址生成短链接
  • 做课件的网站上海三益建筑设计有限公司
  • .net做的网站代码厦门个人建网站
  • 做网站单位火车采集wordpress发布模块
  • 保定网站建设系统长沙网络营销介绍
  • 深圳最好的网站制作哪家公司好广州建设工程造价管理站网站
  • 自助式建网站网站怎么做搜素引擎
  • 电影网站开发教程东莞怎样制作免费网页
  • 梵客家装口碑怎么样大淘客网站如何做seo
  • 淮南北京网站建设火锅店营销方案
  • 怎么提高网站访问量wordpress被黑
  • 上传资料网站建设部网站官网 施工许可
  • 北京公司网站制作哪家专业wordpress的slider