学习008-02-02 Add Actions (Menu Commands)(添加功能(菜单命令))

Add Actions (Menu Commands)(添加功能(菜单命令))

Before you proceed with this section of the tutorial, you should familiarize yourself with the following basic concepts of the Cross-Platform .NET App UI.
在继续本教程的这一部分之前,您应该熟悉跨平台的以下基本概念。NET应用程序UI。

Action(操作)

Visually, Action is a toolbar item or another control that performs the associated code when an end user manipulates it. XAF has several predefined Action types. You can choose the appropriate type depending on how you want your Action to be displayed within the UI. All Actions expose the Execute event whose handler is executed when end users manipulate the corresponding element. For more details, refer to the Actions topic.
在视觉上,Action是一个工具栏项或另一个控件,当最终用户操作它时,它会执行相关的代码。XAF有几种预定义的Action类型。您可以根据希望Action在UI中的显示方式来选择适当的类型。当最终用户操作相应的元素时,所有Actions都会公开Execute事件,其处理程序将被执行。有关详细信息,请参阅Actions主题。

Controller(控制器)

Controllers are classes inherited from the Controller class. This class has the following descendants that can also serve as base classes for controllers:
控制器是继承自Controller类的类。此类有以下后代,也可以作为控制器的基类:

  • ViewController and its generic versions: ViewController and ObjectViewController<ViewType, ObjectType>
  • ViewController及其通用版本:ViewController和ObjectViewController<ViewType, ObjectType>
  • WindowController

Controllers implement business logic in your application. The application either executes this logic automatically (for example, on activation of a View) or triggers it when a user executes an Action declared within the Controller. XAF uses reflection to automatically collect controllers implemented within modules. Controller classes should be public. The Controller properties and base class determine the View or the Window where this controller is active. For more details, refer to the Controllers topic.
控制器在应用程序中实现业务逻辑。应用程序要么自动执行此逻辑(例如,在激活视图时),要么在用户执行在控制器中声明的Action时触发它。XAF使用反射来自动收集在模块中实现的控制器。控制器类应该是公共的。控制器属性和基类决定了此控制器处于活动状态的视图或窗口。有关详细信息,请参阅控制器主题。

Controllers and Actions are instruments that implement custom features in an XAF application. In this tutorial section, you will learn how to complete the following tasks:
控制器和操作是在XAF应用程序中实现自定义功能的工具。在本教程部分,您将学习如何完成以下任务:

  • Add Actions of different types(添加不同类型的操作)
  • Implement Controllers without Actions(无需操作即可实现控制器)
  • Modify the behavior of existing Controllers and Actions(修改现有控制器和操作的行为)

We recommend that you complete the lessons in the following order:
我们建议您按以下顺序完成课程:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

汤姆•猫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值