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