Skip to main content

BaseEdit.EditValueType Property

Gets or sets the edit value’s type treatment. This is a dependency property.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v22.1.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public Type EditValueType { get; set; }

Property Value

Type Description
Type

The type to which the entered string is automatically converted.

Remarks

A type that you specify in the EditValueType property should implement the IConvertible. Otherwise, the editor converts the EditValueType property value to a System.Object.

For example, if a user enters ‘100’ within the text editor whose EditValueType property is set to Int32, the editor automatically converts the input string to an integer value and assigns it to the BaseEdit.EditValue property.

The following code sample converts the TextEdit’s value to Int32:

<ThemedWindow ...
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:system="clr-namespace:System;assembly=mscorlib">
    <StackPanel>
        <dxe:TextEdit EditValueType="{x:Type system:Int32}" Text="148"/>
    </StackPanel>
</ThemedWindow>
See Also