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

信誉好的医疗网站建设搜索引擎优化的内容包括

信誉好的医疗网站建设,搜索引擎优化的内容包括,淘宝网站建设策划报告,wordpress可以生成静态吗此教程示范如何添加TreeListControl到项目和绑定控件自引用数据源: 添加数据模型 绑定tree,并添加如下字段到数据源对象: Key字段包含唯一值索引节点 Parent字段包含父索引节点 添加数据模型(Employee和Staff类)到…

此教程示范如何添加TreeListControl到项目和绑定控件自引用数据源:

添加数据模型

绑定tree,并添加如下字段到数据源对象:

Key字段包含唯一值索引节点

Parent字段包含父索引节点

添加数据模型(Employee和Staff类)到MainWindow.xaml.cs 文件:

namespace DxTreeListGettingStarted {public partial class MainWindow : Window { ... }public class Employee {public int ID { get; set; }public int ParentID { get; set; }public string Name { get; set; }public string Position { get; set; }public string Department { get; set; }}public static class Staff {public static List<Employee> GetStaff() {List<Employee> staff = new List<Employee>();staff.Add(new Employee() { ID = 0, Name = "Gregory S. Price", Department = "", Position = "President" });staff.Add(new Employee() { ID = 1, ParentID = 0, Name = "Irma R. Marshall", Department = "Marketing", Position = "Vice President" });staff.Add(new Employee() { ID = 2, ParentID = 0, Name = "John C. Powell", Department = "Operations", Position = "Vice President" });staff.Add(new Employee() { ID = 3, ParentID = 0, Name = "Christian P. Laclair", Department = "Production", Position = "Vice President" });staff.Add(new Employee() { ID = 4, ParentID = 0, Name = "Karen J. Kelly", Department = "Finance", Position = "Vice President" });staff.Add(new Employee() { ID = 5, ParentID = 1, Name = "Brian C. Cowling", Department = "Marketing", Position = "Manager" });staff.Add(new Employee() { ID = 6, ParentID = 1, Name = "Thomas C. Dawson", Department = "Marketing", Position = "Manager" });staff.Add(new Employee() { ID = 7, ParentID = 1, Name = "Angel M. Wilson", Department = "Marketing", Position = "Manager" });staff.Add(new Employee() { ID = 8, ParentID = 1, Name = "Bryan R. Henderson", Department = "Marketing", Position = "Manager" });staff.Add(new Employee() { ID = 9, ParentID = 2, Name = "Harold S. Brandes", Department = "Operations", Position = "Manager" });staff.Add(new Employee() { ID = 10, ParentID = 2, Name = "Michael S. Blevins", Department = "Operations", Position = "Manager" });staff.Add(new Employee() { ID = 11, ParentID = 2, Name = "Jan K. Sisk", Department = "Operations", Position = "Manager" });staff.Add(new Employee() { ID = 12, ParentID = 2, Name = "Sidney L. Holder", Department = "Operations", Position = "Manager" });staff.Add(new Employee() { ID = 13, ParentID = 3, Name = "James L. Kelsey", Department = "Production", Position = "Manager" });staff.Add(new Employee() { ID = 14, ParentID = 3, Name = "Howard M. Carpenter", Department = "Production", Position = "Manager" });staff.Add(new Employee() { ID = 15, ParentID = 3, Name = "Jennifer T. Tapia", Department = "Production", Position = "Manager" });staff.Add(new Employee() { ID = 16, ParentID = 4, Name = "Judith P. Underhill", Department = "Finance", Position = "Manager" });staff.Add(new Employee() { ID = 17, ParentID = 4, Name = "Russell E. Belton", Department = "Finance", Position = "Manager" });return staff;}}
}

添加视图模型

创建视图模型暴露Employees字段:

using DevExpress.Mvvm;namespace DxTreeListGettingStarted {public partial class MainWindow : Window { ... }public class Employee { ... }public static class Staff { ... }public class MainWindowViewModel : ViewModelBase {public MainWindowViewModel() {Employees = Staff.GetStaff();}public List<Employee> Employees { get; private set; }}
}

设置window数据上下文到视图模型:

<Window... ><Window.DataContext><local:MainWindowViewModel/></Window.DataContext>

添加TreeListControl到视图

拖动TreeListControl组件从工具箱到form里面

选择TreeListControl点击Quick Actions

点击重新计算按钮到ItemsSource属性调用上下文菜单。选择创建数据绑定

选择Employees在对话框点击OK

设置AutoGenerateColumns添加AddNew

切换到XAML视图,定义TreeListControl 视图:

<dxg:TreeListControl AutoGenerateColumns="AddNew" ItemsSource="{Binding Employees}"><dxg:TreeListControl.View><dxg:TreeListView /></dxg:TreeListControl.View>
</dxg:TreeListControl>

返回设计器视图,选择TreeListView调用Quick Actions

启动AutoWidth和AutoExpandAllNodes选项。指定服务行(TreeListView.KeyFieldName 和 TreeListView.ParentFieldName)生成tree:

<dxg:TreeListControl ItemsSource="{Binding Employees}"AutoGenerateColumns="AddNew" ><dxg:TreeListControl.View><dxg:TreeListView KeyFieldName="ID" ParentFieldName="ParentID"AutoWidth="True" AutoExpandAllNodes="True" /></dxg:TreeListControl.View>
</dxg:TreeListControl>

运行程序

http://www.dt0577.cn/news/43229.html

相关文章:

  • wordpress安装怎么切换中文台州seo优化
  • 建设部网站查询广州番禺发布网
  • 政府网站cms俄罗斯搜索引擎入口
  • 做单页网站要多少钱蜘蛛搜索
  • 成人做视频在线观看网站百度山西授权代理
  • 网站设计怎么做背景颜色seo服务价格表
  • 网站建设中企动力强宁波seo外包推广
  • 泉州专业网站开发公司网络上哪里可以做推广
  • 富阳网站开发社区推广方法有哪些
  • 网站编辑器哪个好网络营销推广合作
  • 免费建站的方法流程爱站网的关键词是怎么来的
  • 专业做网站的顺德公司太原优化排名推广
  • 模块化网站建设免费发布产品信息的网站
  • 来年做那些网站致富百度推广有效果吗
  • 做外贸soho网站的公司郑州seo外包公司哪家好
  • 怎么做网站上的模拟动画百度竞价规则
  • 山东网站建设做一个电商平台大概需要多少钱
  • 两个网站做响应式网站推广软件赚钱违法吗
  • 基于vue的个人网站开发微信营销推广公司
  • 桥梁建设网站在哪里可以投稿免费注册个人网站不花钱
  • 手机模板网站模板排名公式
  • 深圳做网站供应商什么是软文营销?
  • 广州手机网站建设微信加精准客源软件
  • 网站建设实验小结东莞做网站哪家好
  • 个人网站怎么做支付功能编程培训班学费一般多少钱
  • 网站网格布局免费b站推广网站入口202
  • 佛山网站建设专业现状适合发软文的平台
  • 电子手工外发加工网深圳知名网络优化公司
  • 网上接网站做福州排名seo公司
  • pc网站建设是什么意思西安网站制作