Ways to Show a View(展示视图的方法)
Typically, Views are displayed in response to user input, for example, when a menu item is clicked. This topic lists ways to create and show a View.
通常,视图会响应用户输入而显示,例如,当单击菜单项时。本主题列出了创建和显示视图的方法。
Show a View from the Navigation Control(从导航控件显示视图)
The navigation system is visualized by the navigation control, which lists all available Views and allows you to activate the required View. The navigation structure defines the Views order and hierarchy.
导航系统由导航控件可视化,该控件列出了所有可用的视图并允许您激活所需的视图。导航结构定义了视图顺序和层次结构。
Add a View to the Navigation Control in Code(在代码中向导航控件添加视图)
The simplest way to add a List View to the navigation is to apply the DefaultClassOptionsAttribute to the business class. As a result, XAF adds a new navigation item to the Default group.
将列表视图添加到导航的最简单方法是将DefaultClassOptionsAttribute应用于业务类。因此,XAF将一个新的导航项添加到默认组。
C#
[DefaultClassOptions]
public class Contact {
//...
}
You can also use the NavigationItemAttribute for the same purpose. The difference is that this attribute allows you to specify the navigation group, while the DefaultClassOptions attribute always adds an item to the Default group.
您也可以将NavigationItemAttribute用于相同的目的,不同之处在于,此属性允许您指定导航组,而DefaultClassOptions属性总是向Default组添加一个项目。
C#
[NavigationItem("Management&