Boolean Properties(布尔属性)
In XAF, the following controls can display Boolean and Nullable Boolean properties:
在XAF中,以下控件可以显示布尔和Nullable布尔属性:
- A checkbox control (default).
复选框控件(默认)。 - A drop-down control that displays Boolean values as custom text strings. You can use the IModelCommonMemberViewItem.CaptionForTrue and IModelCommonMemberViewItem.CaptionForFalse properties to specify these strings in the Application Model.
将布尔值显示为自定义文本字符串的下拉控件。您可以使用IModelCommonMemberViewItem. CaptionForTrue和IModelCommonMemberViewItem.CaptionForFalse属性在应用程序模型中指定这些字符串。 - A drop-down control can display Boolean values as custom text strings accompanied by images. You can define these strings in the same manner as for a drop-down control. Use the IModelCommonMemberViewItem.ImageForTrue and IModelCommonMemberViewItem.ImageForFalse properties to assign images for the true and false values. This option is available in WinForms and ASP.NET Web Forms applications only.
下拉控件可以将布尔值显示为带有图像的自定义文本字符串。您可以以与下拉控件相同的方式定义这些字符串。使用IModelCommonMemberViewItemImageForTrue和IModelCommonMemberViewItemImageForFalse属性为真值和假值分配图像。此选项仅在WinForms和ASP.NET Web Forms应用程序中可用。
Refer to the following topics for more ORM-specific information on Boolean properties:
有关布尔属性的更多特定于ORM的信息,请参阅以下主题:
- Boolean Properties in XPO(XPO中的布尔属性)
- Boolean 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的属性和事件。
The following table shows available Component Models for BooleanPropertyEditor:
下表显示了BooleanPropertyEditor可用的组件模型:
WinForms
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)
存储库项(在支持就地编辑的列表编辑器中显示属性值)
The following table shows available controls and repository items for BooleanPropertyEditor:
下表显示了BooleanPropertyEditor的可用控件和存储库项:
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窗体属性编辑器都包含在查看和编辑模式下的详细信息视图中显示属性的控件。
The following table shows available controls and repository items for ASPxBooleanPropertyEditor:
下表显示了ASPxBooleanPropertyEditor的可用控件和存储库项: