学习011-08-04 Date and Time Properties(日期和时间属性)

Date and Time Properties(日期和时间属性)

XAF supports Property Editors for DateTime, Nullable DateTime, TimeSpan, and Nullable TimeSpan types on all platforms.
XAF支持所有平台上DateTime、Nullable DateTime、TimeSpan和Nullable TimeSpan类型的属性编辑器。

Refer to the following topics for information on how to add Date and Time properties to business classes in the supported ORM systems:
有关如何将日期和时间属性添加到受支持的ORM系统中的业务类的信息,请参阅以下主题:

  • Date and Time Properties in XPO(XPO中的日期和时间属性)
  • Date and Time Properties in EF Core(EF Core中的日期和时间属性)

ASP.NET Core Blazor

在这里插入图片描述

In ASP.NET Core Blazor, BlazorPropertyEditorBase.ComponentModel returns an IComponentModel descendant that wraps properties and events of a corresponding ASP.NET Core Blazor Editor.
在ASP.NET Core Blazor中,BlazorPropertyEditorBaseComponentModel返回一个IComponentModel后代,它包装了相应ASP.NET Core Blazor Editor的属性和事件。

DateTimePropertyEditor

Component Model: DevExpress.ExpressApp.Blazor.Components.Models.DxDateEditModel<T>.
组件模型:DevExpress. ExpressApp.Blazor.Components.Model.DxDateEditModel<T>。

Component: DevExpress ASP.NET Core Blazor Library’s DxDateEdit<T> editor.
组件:DevExpress ASP.NET Core Blazor Library的DxDateEdit<T>编辑器。

Description:
描述

This is the default Property Editor for DateTime and DateOnly (EF Core) properties. Access the MaskProperties property to modify the Component mask properties.
这是DateTime和DateOnly(EF Core)属性的默认属性编辑器。访问MaskProperties属性以修改组件掩码属性。

TimeSpanPropertyEditor

Component Model: DevExpress.ExpressApp.Blazor.Components.Models.DxTimeEditModel<T>.
组件模型:DevExpress. ExpressApp.Blazor.Components.Model.DxTimeEditModel<T>。

Component: DevExpress ASP.NET Core Blazor Library’s DxTimeEdit<T> editor.
组件:DevExpress ASP.NET Core Blazor Library的DxTimeEdit<T>编辑器。

Description:
描述

This is the default Property Editor for TimeSpan and TimeOnly (EF Core) properties. Access the MaskProperties property to modify the Component’s mask properties.
这是TimeSpan和TimeOnly(EF Core)属性的默认属性编辑器。访问MaskProperties属性以修改组件的掩码属性。

Windows Forms

Each Windows Forms Property Editor is available in two forms:
每个Windows窗体属性编辑器都有两种形式:

  • A standalone control (displays property value in a Detail View)(独立控件(在详细信息视图中显示属性值))
  • A repository item (displays property value in a List Editor that supports in-place editing)(存储库项(在支持就地编辑的列表编辑器中显示属性值))

在这里插入图片描述

DatePropertyEditor

Control: DateTimeEdit (a DateEdit descendant).
控件:DateTimeEdit(DateEdit后代)。

Repository Item: RepositoryItemDateTimeEdit (a RepositoryItemDateEdit descendant).
存储库项:RepositoryItemDateTimeEdit(RepositoryItemDateEdit后代)。

Description:
描述

This Property Editor is used for DateTime properties and applies the DateTime mask type to store and display values. To set the mask, specify one of the following:
此属性编辑器用于DateTime属性并应用DateTime掩码类型来存储和显示值。要设置掩码,请指定以下选项之一:

  • The Property Editor’s EditMask property in code(代码中属性编辑器的EditMask属性)
  • The Views | <DetailView> | Items | <PropertyEditor> node’s IModelCommonMemberViewItem.EditMask property in the Model Editor( Views | <DetailView> | Items | <PropertyEditor>节点的IModelCommonMemberViewItem。模型编辑器中的EditMask属性)

Do one of the following to invoke a drop-down calendar:
执行以下操作之一以调用下拉日历:

  • Press Alt + Down Arrow(按Alt+向下箭头)
  • Click the editor’s arrow(单击编辑器的箭头)
  • Double-click the editor(双击编辑器)

In the invoked calendar, you can select any date or the current date (at the top of the calendar). Click Clear to set the editor value to null.
在调用的日历中,您可以选择任何日期或当前日期(在日历顶部)。单击清除将编辑器值设置为null。

You can perform date operations without the drop-down calendar. For example, press the Space key to enter a date from the keyboard. To clear the editor value, press Ctrl+0 or Ctrl+Delete.
您可以在没有下拉日历的情况下执行日期操作。例如,按Space键从键盘输入日期。要清除编辑器值,请按Ctrl+0或Ctrl+Delete。

TimeSpanPropertyEditor

Control: TimeSpanEdit (a TextEdit descendant).
控件:TimeSpanEdit(TextEdit后代)。

Repository Item: RepositoryItemTimeSpanEdit (a RepositoryItemTextEdit descendant).
存储库项:RepositoryItemTimeSpanEdit(RepositoryItemTextEdit后代)。

Description:
描述

The default value of this Property Editor’s EditMaskType property is RegEx. This means that you can use extended regular expressions to specify the EditMask (in code or in the Model Editor). To switch the mask type, change the EditMaskType property value. Then, use a View Controller to access the corresponding TimeSpanPropertyEditor instance and specify a mask for it. For more information, refer to the following topic: Access the Settings of a Property Editor in a Detail View.
此属性编辑器的EditMaskType属性的默认值为RegEx。这意味着您可以使用扩展正则表达式来指定EditMask(在代码或模型编辑器中)。要切换掩码类型,请更改EditMaskType属性值。然后,使用视图控制器访问相应的TimeSpanPropertyEditor实例并为其指定掩码。有关详细信息,请参阅以下主题:在详细信息视图中访问属性编辑器的设置。

ASP.NET Web Forms

在这里插入图片描述

Each ASP.NET Web Forms Property Editor includes controls that display a property in a Detail View in View and Edit mode.
每个ASP.NET Web Forms 属性编辑器都包含在查看和编辑模式下的详细信息视图中显示属性的控件。

ASPxDateTimePropertyEditor

View mode control: System.Web.UI.WebControls.Label.
查看模式控制:System. Web.UI.WebControls.Label。

Edit mode control: ASPxEditors Library’s ASPxDateEdit editor.
编辑模式控件:ASPxEditor Library的ASPxDateEdit编辑器。

Description:
描述:

This is the default Property Editor for DateTime properties.
这是DateTime属性的默认属性编辑器。

It uses the specified mask to store and display values. To set a mask, use the Property Editor’s EditMask property in code, or the Views | <DetailView> | Items | <PropertyEditor> node’s IModelCommonMemberViewItem.EditMask property in the Model Editor.
它使用指定的掩码来存储和显示值。要设置掩码,请在代码中使用属性编辑器的EditMask属性,或在模型编辑器中使用 Views | <DetailView> | Items | <PropertyEditor>节点的IModelCommonMemberViewItemEditMask属性。

Click the editor’s arrow or double-click the editor to invoke a drop-down calendar. In the invoked calendar, click the current date at the top, select a date, or click Clear to empty the editor’s value.
单击编辑器的箭头或双击编辑器以调用下拉日历。在调用的日历中,单击顶部的当前日期,选择一个日期,或单击清除以清空编辑器的值。

ASPxTimeSpanPropertyEditor

View mode control: System.Web.UI.WebControls.Label.
查看模式控制:System. Web.UI.WebControls.Label。

Edit mode control: ASPxEditors Library’s ASPxTextBox editor.
编辑模式控制:ASPxEditor Library的ASPxTextBox编辑器。

Description:
描述:

This is the default Property Editor for TimeSpan properties.
这是TimeSpan属性的默认属性编辑器。

The editor is inherited from the ASPxStringPropertyEditor class.
编辑器继承自ASPxStringPropertyEditor类。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

汤姆•猫

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

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

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

打赏作者

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

抵扣说明:

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

余额充值