In this lesson, you will learn how to change the style of navigation items in a WinForms XAF application. By default, a 32x32 icon with a label below is displayed for each item. This style is inconvenient when you have many navigation items. To save screen space and avoid scrolling, a 16x16 icon with a label to the right can be displayed for each item instead.

在本课中,您将学习如何更改 WinForms XAF 应用程序中的导航项样式。默认情况下,每个项目都会显示一个带有以下标签的 32x32 图标。当您有许多导航项时,此样式不方便。为了节省屏幕空间并避免滚动,可以为每个项目显示右侧带有标签的 16x16 图标。

  • Invoke the Model Editor by double-clicking the Model.DesignedDiffs.xafml file located in the MySolution.Module project. Navigate to the NavigationItems | Items | Default node. This node specifies settings for the Default navigation group that encloses navigation items created in the previous lessons (Contact, Task, Department, etc.). In the grid to the right, set the ChildItemsDisplayStyle property to List (the default is LargeIcons).

  • 通过双击"模型.设计Diffs.xafml"文件来调用模型编辑器。该文件位于 MySolution.模块项目中。导航到导航项 |项目 |默认节点。此节点指定默认导航组的设置,该设置包含在前面的课程(联系人、任务、部门等)中创建的导航项。在右侧的网格中,将"子项显示样式"属性设置为"列表"(默认值为"大图标")。

For details, see the IModelChoiceActionItemChildItemsDisplayStyle.ChildItemsDisplayStyle property and ItemsDisplayStyle enumeration description.

有关详细信息,请参阅 ImodelChoiceactionItems"儿童项显示样式.子项显示样式"属性和项目显示样式枚举说明。

  • Run the WinForms application. You will see that small icons are now used for navigation items in the Default navigation group. The image below illustrates the changes.
  • 运行 WinForms 应用程序。您将看到,小图标现在用于默认导航组中的导航项。下图说明了这些更改。

Note 注意
You can also change the style of the entire navigation control. Run the Model Editor and modify the IModelRootNavigationItems.NavigationStyle property of the NavigationItems node for this purpose.

您还可以更改整个导航控件的样式。为此,运行模型编辑器并修改导航项节点的 IModelRoot 导航项.导航样式属性。

最新文章

  1. MyEclipse JAX-WS Web Service
  2. ExtJs6.0.0随笔
  3. jquery指index
  4. Express 路由
  5. 黄聪:jquery mobile通过a标签页面跳转后,样式丢失、js失效的解决方法
  6. 李洪强iOS开发之代理
  7. Idea的Git使用
  8. OpenGL ES 2.0 曲面物体的构建
  9. 丰富的else语句及简洁的with语句 - 零基础入门学习Python034
  10. 报LinkageError的原因
  11. hbase开放lzo压缩
  12. 关于Unicode字符集
  13. 性能调优之MYSQL高并发优化
  14. [Spark内核] 第31课:Spark资源调度分配内幕天机彻底解密:Driver在Cluster模式下的启动、两种不同的资源调度方式源码彻底解析、资源调度内幕总结
  15. DM企业建站系统v201710 sql注入漏洞分析 | 新版v201712依旧存在sql注入
  16. spring boot sso
  17. Python Spider - urllib.request
  18. restTemplate.postForObject上传文件中文乱码(???.xls)
  19. linux系统调用之网络管理2
  20. Java--- Ambiguous mapping. Cannot map "***Controller" been method解决办法

热门文章

  1. 技术谈 | SDN 和 NFV 之间的爱与恨
  2. Python爬虫实战之爬取糗事百科段子
  3. chrome浏览器通过ajax的POST请求报403解决方法
  4. leetcode字节跳动专题(持续更新)
  5. CC1605&CC1604 usb3.0+FPGA 高速视频采集 双目相机测评
  6. Java 将Excel转为图片、html、XPS、XML、CSV
  7. 国内下载vscode速度慢解决
  8. Day 07 字符串内置方法和爬虫基础3
  9. VMware虚拟机安装Linux(CentOS)系统
  10. kafka生产消息,streaming消费