Skip to main content

BarEditItem.EditValue Property

Specifies the value for the BarEditItem‘s editor. This is a dependency property.

Namespace: DevExpress.Xpf.Bars

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

NuGet Package: DevExpress.Wpf.Core


public object EditValue { get; set; }

Property Value

Type Description

An object that represents the edit value for the in-place editor.


Use the EditValue property to get and set an in-place editor’s value. When setting the EditValue property, ensure that the new value is of the type that is accepted by the in-place editor. For instance, a SpinEdit editor accepts numeric values, while a TextEdit control is used to edit string values.

To respond to changing the EditValue property, handle the BarEditItem.EditValueChanged event.

If a text editor (TextEditSettings) or its descendant is assigned to the BarEditItem, the text being entered in the edit box is saved to the EditValue property with each keystroke by default. To change the trigger for the value validation and posting operation, use the TextEditSettings.ValidateOnTextInput and TextEditSettings.ValidateOnEnterKeyPressed properties. For instance, to validate the text and save it to the EditValue only when the ENTER key is pressed, set the TextEditSettings.ValidateOnTextInput property to false, and the TextEditSettings.ValidateOnEnterKeyPressed property to true.


This example shows how to embed in-place editors into a bar using BarEditItem objects. Two editors (DateEdit and SpinEdit) are added with the BarEditItem.EditSettings property. Values for the editors are provided using the EditValue property.

The following image shows the result:


View Example

        Title="Window2" Height="300" Width="300">

            <RowDefinition Height="Auto" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>

        <dxb:BarContainerControl Grid.Row="0">
                <!--Create a DateEdit and SpinEdit in-place editors -->
                <dxb:BarEditItem x:Name="editItemDateEdit1" Content="Date" EditValue="01/01/2010">
                        <dxe:DateEditSettings />
                <dxb:BarEditItem x:Name="editItemSpinEdit1" Content="Value" EditValue="123" EditWidth="50">
                        <dxe:SpinEditSettings />


        <DockPanel Name="dockPanel1" LastChildFill="False" VerticalAlignment="Stretch">
            <!--Create a BarContainerControl that will display bars at the top of the DockPanel-->
            <dxb:BarContainerControl x:Name="TopBarContainer" DockPanel.Dock="Right" ContainerType="Right">



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


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