Back to Devexpress

BarEditItem.EditSettings Property

wpf-devexpress-dot-xpf-dot-bars-dot-baredititem.md

latest7.4 KB
Original Source

BarEditItem.EditSettings Property

Gets or sets the edit settings for the item, based upon which an in-place editor is created. This is a dependency property.

Namespace : DevExpress.Xpf.Bars

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public BaseEditSettings EditSettings { get; set; }
vb
Public Property EditSettings As BaseEditSettings

Property Value

TypeDescription
BaseEditSettings

A BaseEditSettings object.

|

Remarks

To display a specific in-place editor within bars, create a BarEditItem object and assign a BaseEditSettings descendant instance to the EditSettings property. The type of the assigned object will specify the type of the in-place editor created. The created editor can be accessed via the BarEditItemLink.Editor property.

To provide values for the in-place editor, use the BarEditItem.EditValue property. The BarEditItem.EditValueChanged event allows you to respond to changing the edit value.

Example

This example embeds in-place editors into a bar using BarEditItem objects. Two editors ( DateEdit and SpinEdit ) are added with the BarEditItem.EditSettings property. Values for these editors are added through the BarEditItem.EditValue property.

The following image demonstrates the result:

xaml
<Window x:Class="CreateBarEditItems.Window1" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="Window1" Height="300" Width="400" 
        xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" 
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <dxb:BarContainerControl ContainerType="Top" Grid.Row="0">
            <dxb:ToolBarControl Caption="Settings Bar" RotateWhenVertical="True">
                <!--Create a DateEdit and SpinEdit in-place editors -->
                <dxb:BarEditItem x:Name="editItemDateEdit1" Content="Date" EditValue="01/01/2020" EditWidth="100">
                    <dxb:BarEditItem.EditSettings>
                        <dxe:DateEditSettings />
                    </dxb:BarEditItem.EditSettings>
                </dxb:BarEditItem>
                <dxb:BarEditItem x:Name="editItemSpinEdit1" Content="Value" EditValue="123" EditWidth="100">
                    <dxb:BarEditItem.EditSettings>
                        <dxe:SpinEditSettings />
                    </dxb:BarEditItem.EditSettings>
                </dxb:BarEditItem>
            </dxb:ToolBarControl>
        </dxb:BarContainerControl>

        <DockPanel Grid.Row="1" LastChildFill="True">
            <dxb:BarContainerControl ContainerType="Left" DockPanel.Dock="Left"/>
            <dxb:BarContainerControl ContainerType="Right" DockPanel.Dock="Right"/>
            <RichTextBox/>
        </DockPanel>

        <dxb:BarContainerControl ContainerType="Bottom" Grid.Row="2">
            <dxb:StatusBarControl Caption="Status Bar"/>
        </dxb:BarContainerControl>
    </Grid>
</Window>

The following code snippets (auto-collected from DevExpress Examples) contain references to the EditSettings 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.

wpf-spreadsheet-assign-custom-in-place-editors/CS/WpfSpreadsheet_CustomCellEditors/MainWindow.xaml#L45

xml
<dxb:BarEditItem x:Name="biFormatFontName" Content="" Command="{Binding FormatFontName, Mode=OneTime, Source={StaticResource commands}}" EditWidth="150">
    <dxb:BarEditItem.EditSettings>
        <dxo:FontComboBoxEditSettings />

wpf-spreadsheet-bind-spreadsheet-to-ms-sql-server-database/CS/WpfSpreadsheet_BindToDataSource/MainWindow.xaml#L45

xml
<dxb:BarEditItem x:Name="biFormatFontName" Content="" Command="{Binding FormatFontName, Mode=OneTime, Source={StaticResource commands}}" EditWidth="150">
    <dxb:BarEditItem.EditSettings>
        <Custom:FontComboBoxEditSettings />

wpf-spreadsheet-bind-a-worksheet-to-generic-list-or-bindinglist-data-source/CS/DataBindingToListExample/MainWindow.xaml#L40

xml
<dxb:BarEditItem x:Name="biFormatFontName" Content="" Command="{Binding FormatFontName, Mode=OneTime, Source={StaticResource commands}}" EditWidth="150">
    <dxb:BarEditItem.EditSettings>
        <Custom:FontComboBoxEditSettings/>

wpf-create-a-ribboncontrol/CS/RibbonControl_Ex/MainWindow.xaml#L90

xml
EditValue="{Binding RibbonStyle, ElementName=RibbonControl}">
<dxb:BarEditItem.EditSettings>
    <dxe:ComboBoxEditSettings IsTextEditable="False" PopupMaxHeight="250"

wpf-mvvm-behaviors-barItems-based-theme-selectors/CS/WpfApplication1/MainWindow.xaml#L24

xml
EditWidth="100">
<dxb:BarEditItem.EditSettings>
    <dxe:ComboBoxEditSettings IsTextEditable="False" PopupMaxHeight="250">

See Also

EditValue

EditValueChanged

Editor

BarEditItem Class

BarEditItem Members

DevExpress.Xpf.Bars Namespace