• How to: Display Several Views Side-by-Side 如何:并排显示多个视图


    This topic demonstrates how you can display several Views side-by-side on a single screen. For this purpose, the "Simple Dashboard" Dashboard View, demonstrated in the FeatureCenter Demo, installed with XAF, will be recreated from scratch. Dashboard Views are a special View type, designed specifically to display any number of unrelated Views in single Frame.

    本主题演示如何在单个屏幕上并排显示多个视图。为此,功能中心演示中演示的"简单仪表板"仪表板视图(与 XAF 一起安装)将从头开始重新创建。仪表板视图是一种特殊的视图类型,专门设计用于在单个帧中显示任意数量的不相关视图。

    Note 注意
    Mobile applications do not support Dashboard Views.
    移动应用程序不支持仪表板视图。

    If you need to display a List View together with the Detail View displaying the List View's currently selected object properties, in a Windows Forms XAF application, refer to the List View Edit Modes help topic instead.

    如果需要在 Windows 窗体 XAF 应用程序中显示列表视图以及显示列表视图当前选定对象属性的详细信息视图,请改为"列表视图编辑模式"帮助主题。

    Dashboard1

    To begin this tutorial, open the FeatureCenter demo solution located in the %PUBLIC%DocumentsDevExpress Demos 19.2ComponentseXpressApp FrameworkFeatureCenterCS folder, by default, and specify a valid database connection string for the Windows Forms application project. To learn how to specify connection strings, refer to the Connect an XAF Application to a Database Provider help topic.

    要开始本教程,请打开位于 %PUBLIC%_文档_DevExpress 演示 19.2_组件_eXpressApp 框架_功能中心_CS 文件夹的功能中心演示解决方案,并默认为 Windows 窗体指定有效的数据库连接字符串应用程序项目。要了解如何指定连接字符串,请参阅将 XAF 应用程序连接到数据库提供程序帮助主题。

    Create a Dashboard View

    创建仪表板视图

    First, create a Dashboard View that will be used to display several Views side-by-side. For this purpose, invoke the Model Editor for the FeatureCenter.Module.Win project. Right-click the Views node and add a Dashboard View.

    首先,创建一个仪表板视图,用于并排显示多个视图。为此,调用功能中心模型编辑器.module.Win 项目。右键单击"查看"节点并添加仪表板视图。

    DashboardTutorial1

    Set the Id property of the created View to MyDashboardView.

    将创建的视图的 Id 属性设置为 MyDashboardView。

    DashboardTutorial1_1

    Specify the Views to Be Displayed on the Dashboard View

    指定要在仪表板视图上显示的视图

    Second, specify the Views to be displayed on the Dashboard View, by creating Dashboard View Items. A DashboardViewItem displays a View specified by the item's IModelDashboardViewItem.View property of the Application Model's corresponding DashboardViewItem node. Right-click the Items node and add a Dashboard View Item.

    其次,通过创建仪表板视图项,指定要在仪表板视图上显示的视图。仪表板视图项显示由项的 IModelDashboardViewItem 指定的视图。查看应用程序模型对应的仪表板视图项节点的属性。右键单击"项目"节点并添加仪表板视图项。

    DashboardTutorial2

    Set the View property of the created Dashboard View Item to Order_ListView_PivotGrid_SalesAnalysis.

    将创建的仪表板视图项的视图属性设置为Order_ListView_PivotGrid_SalesAnalysis。

    DashboardTutorial2_1

    Note 注意
    In the Feature Center application, the Order_ListView_PivotGrid_SalesAnalysis List View is visualized by the Pivot Grid List Editor (the List View's IModelListView.EditorType property is set to PivotGridListEditor for WinForms application and to ASPxPivotGridListEditor for ASP.NET in the Model Editor). Refer to the Pivot Grid Module topic to learn more.
    在功能中心应用程序中,Order_ListView_PivotGrid_SalesAnalysis列表视图由数据透视网格列表编辑器可视化(列表视图的 IModelListView.编辑器属性设置为 WinForms 应用程序的透视网格编辑器,并设置为ASPxPivotGridlist编辑器,用于模型编辑器中ASP.NET)。有关详细信息,请参阅数据透视网格模块主题。

    Add another Dashboard View Item and set its View property to Order_ListView_Chart_Employees.

    添加另一个仪表板视图项,并将其视图属性设置为Order_ListView_Chart_Employees。

    DashboardTutorial2_2

    Add a KPI Dashboard View Item. Such items are used to display Key Performance Indicator results provided by the KPI Module. Set the KpiName property of the created item to Outdated shippings count.

    添加 KPI 仪表板视图项。此类项目用于显示 KPI 模块提供的关键绩效指示器结果。将创建项的 KpiName 属性设置为过期装运计数。

    DashboardTutorial2_3

    Note that Dashboard Views support a wide range of View Items. So, a Dashboard View can display not only Views but images, blocks of text and Action Containers. For this purpose, you can add StaticText, StaticImage and ActionContainerViewItem View Items to the Dashboard View.

    请注意,仪表板视图支持各种视图项。因此,仪表板视图不仅可以显示视图,还可以显示图像、文本块和操作容器。为此,您可以将静态文本、静态图像和操作容器视图项添加到仪表板视图。

    Configure the Dashboard View Layout

    配置仪表板视图布局

    Third, configure the Dashboard View layout as you like. For a thorough explanation of how to customize a View layout, refer to the View Items Layout Customization help topic.

    第三,根据需要配置仪表板视图布局。有关如何自定义视图布局的详细说明,请参阅查看项目布局自定义帮助主题。

    DashboardTutorial3

    Create a Navigation Item

    创建导航项

    Finally, create a navigation item, so that users can invoke the created Dashboard View. Right-click the Items child node of the NavigationItems node and add a Navigation Item.

    最后,创建导航项,以便用户可以调用创建的仪表板视图。右键单击"导航项"节点的"项目"子节点并添加导航项。

    DashboardTutorial4

    Set the View property of the created View to MyDashboardView.

    将创建的视图的"视图"属性设置为"我的仪表板视图"。

    DashboardTutorial4_1

    Run the Windows Forms application, and you will be able to see the created Dashboard View in action.

    运行 Windows 窗体应用程序,您将能够看到创建的仪表板视图在操作中。

  • 相关阅读:
    Java实现直接插入查找
    CSS hack常用方案(摘选)
    输入一个字符串,去掉重复的字符,并按ASCII值排序-华为机试
    git操作github
    简单记录下idea上配置spring
    mysql国内镜像下载网址
    tomcat启动不成功(点击startup.bat闪退)的解决办法
    Encode and Decode TinyURL
    leetcode 4Sum II
    leetcode two sum
  • 原文地址:https://www.cnblogs.com/foreachlife/p/How-to-Display-Several-Views-Side-by-Side.html
Copyright © 2020-2023  润新知