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.v24.2.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>

The following code snippets (auto-collected from DevExpress Examples) contain references to the EditValueType property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also