首页 > 其他分享 >学习011-08-03 Numeric Properties(数字属性)

学习011-08-03 Numeric Properties(数字属性)

时间:2024-10-09 11:47:45浏览次数:3  
标签:03 Property 08 Numeric editor 编辑器 Editor property 属性

Numeric Properties(数字属性)

XAF supports Property Editors for numeric data types (byte, int, decimal, long, corresponding nullable types, etc.) on all platforms. However, WinForms, ASP.NET Web Forms, and Blazor UI applications use different formatting rules depending on the underlying property type.
XAF支持所有平台上数字数据类型(byte、int、decimal、long、相应的可空类型等)的属性编辑器。但是,WinForms、ASP.NETWeb Forms和Blazor UI应用程序根据基础属性类型使用不同的格式规则。

Refer to the following topics for information on how to add Numeric properties to business classes in the supported ORM systems:
有关如何在支持的ORM系统中将数字属性添加到业务类的信息,请参阅以下主题:

  • Numeric Properties in XPO(XPO中的数字属性)
  • Numeric 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.NETCore Blazor中,BlazorPropertyEditorBaseComponentModel返回一个IComponentModel后代,它包装了相应ASP.NETCore Blazor Editor的属性和事件。

NumericPropertyEditor

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

Component: the DxSpinEdit<T> editor shipped with the DevExpress ASP.NET Core Blazor Library.
组件:DevExpressASP.NETCore Blazor库附带的DxSpinEdit<T>编辑器。

Description:
描述:
This is the default Property Editor for the following numeric property types: Int16, UInt16, Int32, UInt32, Int64, UInt64, float, double, Decimal, byte.
这是以下数字属性类型的默认属性编辑器:Int16、UInt16、Int32、UInt32、Int64、UInt64、 float、 double、 Decimal、 byte。

To access and customize UI controls in XAF applications, create a ViewController that accesses a NumericPropertyEditor object to modify the underlying DxSpinEdit control. For more information, refer to the following topic: Access the Settings of a Property Editor in a Detail View.
要访问和自定义XAF应用程序中的UI控件,请创建访问NumericPropertyEditor对象以修改底层DxSpinEdit控件的ViewController。有关详细信息,请参阅以下主题:在详细信息视图中访问属性编辑器的设置。

Disable Mouse Wheel Functionality(禁用鼠标滚轮功能)

Users can scroll the mouse wheel to change the NumericPropertyEditor‘s value. To disable this behavior, ensure that the DxSpinEdit.AllowMouseWheel property is set to false.
用户可以滚动鼠标滚轮来更改NumericPropertyEditor的值。要禁用此行为,请确保DxSpinEdit. AllowMouseWheel属性设置为false。

C#
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Blazor.Editors;


public class CustomizeNumericPropertyEditorController : ViewController {


    protected override void OnActivated() {
        base.OnActivated();
        if(View is ListView { Editor: DxGridListEditor gridListEditor }) {
            gridListEditor.CustomizeViewItemControl<NumericPropertyEditor>(this, CustomizePropertyEditor);
        }
        else if(View is DetailView detailView) {
            detailView.CustomizeViewItemControl<NumericPropertyEditor>(this, CustomizePropertyEditor);
        }
    }


    private void CustomizePropertyEditor(NumericPropertyEditor numericPropertyEditor) {
        numericPropertyEditor.ComponentModel.AllowMouseWheel = false;
    }
}
Hide Spin Buttons(隐藏旋转按钮)

A NumericPropertyEditor displays spin buttons that allow users to change the editor’s value. To hide these buttons, ensure that the DxSpinEdit.ShowSpinButtons property is set to false.
NumericPropertyEditor显示允许用户更改编辑器值的旋转按钮。要隐藏这些按钮,请确保DxSpinEdit. ShowSpinButton属性设置为false。

C#
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Blazor.Editors;


public class CustomizeNumericPropertyEditorController : ViewController {


    protected override void OnActivated() {
        base.OnActivated();
        if(View is ListView { Editor: DxGridListEditor gridListEditor }) {
            gridListEditor.CustomizeViewItemControl<NumericPropertyEditor>(this, CustomizePropertyEditor);
        }
        else if(View is DetailView detailView) {
            detailView.CustomizeViewItemControl<NumericPropertyEditor>(this, CustomizePropertyEditor);
        }
    }


    private void CustomizePropertyEditor(NumericPropertyEditor numericPropertyEditor) {
        numericPropertyEditor.ComponentModel.ShowSpinButtons  = false;
    }
}
Apply Numeric Mask(应用数字蒙版)

To apply a mask to a NumericPropertyEditor, use the EditMask property and the Numeric mask type syntax.
若要将掩码应用到NumericPropertyEditor,请使用EditMask属性和数字掩码类型语法。

To further customize the mask, access the NumericPropertyEditor.MaskProperties property.
要进一步自定义掩码,请访问NumericPropertyEditor. MaskProperties属性。

For an example, refer to the following topic: Access EditMask In Code.
例如,请参阅以下主题:在代码中访问EditMask。

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)(存储库项(在支持就地编辑的列表编辑器中显示属性值))

BytePropertyEditor

Control: IntegerEdit – a descendant of the SpinEdit editor shipped with the XtraEditors Library.
控件:IntegerEdit-XtraEditor库附带的SpinEdit编辑器的后代。

Repository Item: RepositoryItemIntegerEdit – a descendant of the XtraEditors Library’s RepositoryItemSpinEdit item.
存储库项:RepositoryItemIntegerEdit-XtraEditor库RepositoryItemSpinEdit项的后代。

Description:
描述:
This is the default Property Editor for byte properties.
这是字节属性的默认属性编辑器。

The editor is a descendant of the IntegerPropertyEditor class. If the repository item’s MaxValue property is set to 0 or to a value that exceeds Byte.MaxValue, the property value is reset to Byte.MaxValue. If the repository item’s MinValue property is set to 0 or to a value that is less than Byte.MinValue, the property value is reset to Byte.MinValue.
编辑器是IntegerPropertyEditor类的后代。如果存储库项的MaxValue属性设置为0或超过Byte. MaxValue的值,则属性值重置为Byte.MaxValue。如果存储库项的MinValue属性设置为0或小于Byte.MinValue的值,则属性值重置为Byte.MinValue。

DecimalPropertyEditor

Control: DecimalEdit – a descendant of the SingleEdit editor used by the FloatPropertyEditor.
控件:DecimalEdit-FloatProperty tyEditor使用的SingleEdit编辑器的后代。

Repository Item: RepositoryItemDecimalEdit – a RepositoryItemSingleEdit item descendant used by the FloatPropertyEditor.
存储库项:RepositoryItemDecimalEdit-FloatProperty tyEditor使用的RepositoryItemSingleEdit项后代。

Description:
描述:
This is the default Property Editor for decimal properties.
这是十进制属性的默认属性编辑器。
The RepositoryItemSingleEdit class helps to store and display values using the C Numeric edit mask when the Property Editor’s EditMask is not specified.
RepositoryItemSingleEdit类有助于在未指定属性编辑器的EditMask时使用C数字编辑掩码存储和显示值。

DoublePropertyEditor

Control: DoubleEdit – a SingleEdit editor descendant used by the FloatPropertyEditor.
控件:DoubleEdit-FloatProperty tyEditor使用的SingleEdit编辑器后代。

Repository Item: RepositoryItemDoubleEdit – a RepositoryItemSingleEdit item descendant used by the FloatPropertyEditor.
存储库项:RepositoryItemDoubleEdit-FloatProperty tyEditor使用的RepositoryItemSingleEdit项后代。

Description:
描述:
This is the default Property Editor for double properties.
这是双属性的默认属性编辑器。

FloatPropertyEditor

Control: SingleEdit – an IntegerEdit editor descendant used by the IntegerPropertyEditor.
控件:SingleEdit-IntegerPropertyEditor使用的IntegerEdit编辑器后代。

Repository Item: RepositoryItemSingleEdit – a RepositoryItemIntegerEdit item descendant used by the IntegerPropertyEditor.
存储库项:RepositoryItemSingleEdit-IntegerPropertyEditor使用的RepositoryItemIntegerEdit项后代。

Description:
描述:
This is the default Property Editor for float properties.
这是浮点属性的默认属性编辑器。
The RepositoryItemIntegerEdit class allows you to display float values.
RepositoryItemIntegerEdit类允许您显示浮点值。

IntegerPropertyEditor

Control: IntegerEdit – a descendant of the SpinEdit editor shipped with the XtraEditors Library.
控件:IntegerEdit-XtraEditor库附带的SpinEdit编辑器的后代。

Repository Item: RepositoryItemIntegerEdit – a descendant of the XtraEditors Library’s RepositoryItemSpinEdit item.
存储库项:RepositoryItemIntegerEdit-XtraEditor库RepositoryItemSpinEdit项的后代。

Description:
描述:
This is the default Property Editor for Int32 properties.
这是Int32属性的默认属性编辑器。
An IntegerPropertyEditor object has the EditMask property. This property’s default value is the Views | <DetailView> | Items | <PropertyEditor> node’s IModelCommonMemberViewItem.EditMask property value. When you assign a value to this property or to the EditMask attribute directly in code, use the syntax of the Numeric mask type. In this instance, the specified mask is applied to the property value displayed by the Property Editor. Refer to the following topic for more information: Mask Editors Overview | Mask Types.
IntegerPropertyEditor对象具有EditMask属性。此属性的默认值是Views|<DetailView>|Items|<Properties tyEditor>节点的IModelCommonMemberViewItem。EditMask属性值。当您直接在代码中为此属性或EditMask属性赋值时,请使用数字掩码类型的语法。在这种情况下,指定的掩码将应用于属性编辑器显示的属性值。有关详细信息,请参阅以下主题:掩码编辑器概述|掩码类型。

LongPropertyEditor

Control: IntegerEdit – a descendant of the SpinEdit editor shipped with the XtraEditors Library.
控件:IntegerEdit-XtraEditor库附带的SpinEdit编辑器的后代。

Repository Item: RepositoryItemIntegerEdit – a descendant of the XtraEditors Library’s RepositoryItemSpinEdit item.
存储库项:RepositoryItemIntegerEdit-XtraEditor库RepositoryItemSpinEdit项的后代。

Description:
描述:
This is the default Property Editor for Int64 properties.
这是Int64属性的默认属性编辑器。

The editor is an IntegerPropertyEditor class descendant. If the repository item’s MaxValue property is set to 0 or to a value that exceeds Long.MaxValue, the property value is reset to Long.MaxValue. If the repository item’s MinValue property is set to 0 or to a value that is less than Long.MinValue, the property value is reset to Long.MinValue.
编辑器是IntegerPropertyEditor类的后代。如果存储库项的MaxValue属性设置为0或超过Long. MaxValue的值,则属性值重置为Long.MaxValue。如果存储库项的MinValue属性设置为0或小于Long.MinValue的值,则属性值重置为Long.MinValue。

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.NETWeb窗体属性编辑器都包含在查看和编辑模式下的详细信息视图中显示属性的控件。

ASPxBytePropertyEditor

View mode control: Label.
查看模式控制:标签。
Edit mode control: the ASPxSpinEdit editor from the ASPxEditors Library.
编辑模式控件:ASPxEditor库中的ASPxSpinEdit编辑器。

Description:
描述:
This is the default Property Editor for byte properties.
这是字节属性的默认属性编辑器。

ASPxDecimalPropertyEditor

View mode control: Label.
查看模式控制:标签。
Edit mode control: the ASPxSpinEdit editor from the ASPxEditors Library.
编辑模式控件:ASPxEditor库中的ASPxSpinEdit编辑器。

Description:
描述:
This is the default Property Editor for decimal properties. The editor is inherited from the ASPxIntPropertyEditor class.
这是十进制属性的默认属性编辑器。编辑器继承自ASPxIntPropertyEditor类。
Uses the C edit mask and display format. This Property Editor also enables float value input.
使用C编辑掩码和显示格式。此属性编辑器还启用浮点值输入。

ASPxDoublePropertyEditor

View mode control: Label.
查看模式控制:标签。
Edit mode control: the ASPxSpinEdit editor from the ASPxEditors Library.
编辑模式控件:ASPxEditor库中的ASPxSpinEdit编辑器。

Description:
描述:
This is the default Property Editor for double properties. The editor is inherited from the ASPxFloatPropertyEditor class. Casts the editor’s value to the double type.
这是双精度属性的默认属性编辑器。编辑器继承自ASPxFloatPropertyEditor类。将编辑器的值转换为双精度类型。

ASPxFloatPropertyEditor

View mode control: Label.
查看模式控制:标签。
Edit mode control: the ASPxSpinEdit editor from the ASPxEditors Library.
编辑模式控件:ASPxEditor库中的ASPxSpinEdit编辑器。

Description:
描述:
This is the default Property Editor for single properties.
这是单个属性的默认属性编辑器。

The editor is inherited from the ASPxIntPropertyEditor class. Uses the F edit mask and display format. This Property Editor also enables float value input.
编辑器继承自ASPxIntPropertyEditor类。使用F编辑掩码和显示格式。此属性编辑器还启用浮点值输入。

ASPxIntPropertyEditor

View mode control: Label.
查看模式控制:标签。
Edit mode control: the ASPxSpinEdit editor from the ASPxEditors Library.
编辑模式控件:ASPxEditor库中的ASPxSpinEdit编辑器。

Description:
描述:
This is the default Property Editor for Int32 properties.
这是Int32属性的默认属性编辑器。

ASPxInt64PropertyEditor

View mode control: Label.
查看模式控制:标签。
Edit mode control: the ASPxSpinEdit editor from the ASPxEditors Library.
编辑模式控件:ASPxEditor库中的ASPxSpinEdit编辑器。

Description:
描述:
This is the default Property Editor for Int64 properties. The editor is inherited from the ASPxIntPropertyEditor class. Casts the editor’s value to the Int64 type.
这是Int64属性的默认属性编辑器。编辑器继承自ASPxIntPropertyEditor类。将编辑器的值转换为Int64类型。

标签:03,Property,08,Numeric,editor,编辑器,Editor,property,属性
From: https://blog.csdn.net/thomastang200912_126/article/details/142782849

相关文章

  • 学习011-08-03-01 Numeric Properties in XPO(XPO中的数字属性)
    NumericPropertiesinXPO(XPO中的数字属性)TheexamplebelowillustrateshowtoimplementNumericPropertiesinanXPOpersistentclass.下面的示例说明了如何在XPO持久类中实现数字属性。C#privatedoubledoubleProperty;publicdoubleDoubleProperty{g......
  • 学习011-08-03-02 Numeric Properties in EF Core(EF Core中的数字属性)
    NumericPropertiesinEFCore(EFCore中的数字属性)TheexamplebelowillustrateshowtoimplementNumericPropertiesinanEFCoreclass.下面的示例说明了如何在EFCore类中实现数字属性。C#publicvirtualdoubleDoubleProperty{get;set;}publicvirtual......
  • 【2024-10-08】母亲坏事
    20:00袅袅凉风动,凄凄寒露零。兰衰花始白,荷破叶犹青。独立栖沙鹤,双飞照水萤。若为寥落境,仍值酒初醒。                                                 ——《池上》唐......
  • nacos gateway 调用服务报错503 Server unavailable
    环境springboot3jdk17依赖<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-bootstrap</artifactId></dependency><dependency><groupId>org.springframe......
  • 20241008
    短路显然可以得出一个结论,一个数字大的点肯定要到一个数字比他小的点,这个我们可以用单调栈维护出来比一个点小的第一个点,然后\(dp\)即可#include<bits/stdc++.h>usingnamespacestd;#defineintlonglongconstintN=1e5+5;intn,a[N],pos[N],dp[N],sum......
  • Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to ma
    这个错误通常发生在使用SpringAOP时,尤其是当你尝试访问AopContext.currentProxy(),但当前代理对象不可用时。下面是一些解决此问题的建议:1.启用 exposeProxy 属性确保你的AOP配置中设置了exposeProxy属性为true。这可以在使用注解或XML配置中进行设置使用注解如......
  • 代码随想录算法训练营第三天|链表理论基础、203.移除链表元素、707.设计链表、206.反
    链表理论基础链表的类型单链表每一个节点由两部分组成,一个是数据域一个是指针域(存放指向下一个节点的指针),最后一个节点的指针域指向null(空指针的意思)。链表的入口节点称为链表的头结点也就是head。双链表单链表中的指针域只能指向节点的下一个节点。双链表:每一个节点有......
  • Hetao P1031 萌萌题 题解 [ 蓝 ] [ 线性 dp ]
    萌萌题:一道结合了观察性质的线性dp。观察我们先考虑极端情况:所有数相同,所有数降序排列两种情况。对于所有数相同的情况,我们发现,最终可以合并出来的区间,最多只有\(n\logn\)个。怎么证明?考虑固定右端点,那么我们想要合并出一个点,就得选\(2^k\)个数出来,这就有\(\logn\)......
  • 20241008_Day 04
    helloworld!1.安装NOTEPAD++2.新建代码文件夹3.新建JAVA文件1.可以新建text文件,修改后缀为.java2.打开方式修改为notepad+++4.编写代码具体为:javapublicclassHello{publicstaticvoidmain(String[]args){System.out.print("Hello,world!");}}5.......
  • 2018_11_02_03
    plugin插件注册importPickerComponentfrom'./picker.vue';let$vm;exportdefault{install(Vue,options){if(!$vm){constpickerPlugin=Vue.extend(PickerComponent);$vm=newpickerPlugin({el:document.createElement......