ListBoxEdit.StyleSettings Property
Gets or sets an object that defines the appearance and behavior of the ListBoxEdit.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v24.1.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
BaseEditStyleSettings | A BaseEditStyleSettings descendant that defines the appearance and behavior of the ListBoxEdit. |
Remarks
A ListBoxEdit supports three built-in styles that define its appearance and behavior: Default (ListBoxEditStyleSettings), Checked (CheckedListBoxEditStyleSettings), and Radio (RadioListBoxEditStyleSettings).
The editor’s ItemContainerStyle property does not affect item appearance if you use the StyleSettings
property to define an operation mode. In this case, use the *StyleSettings
object’s ItemContainerStyle
property.
<Window ...
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxetk="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys">
<dxe:ListBoxEdit ItemsSource="{Binding Customers}"
HorizontalContentAlignment="Stretch">
<dxe:ListBoxEdit.StyleSettings>
<dxe:RadioListBoxEditStyleSettings>
<dxe:RadioListBoxEditStyleSettings.ItemContainerStyle>
<Style BasedOn="{StaticResource {dxetk:EditorListBoxThemeKey ResourceKey=RadioButtonItemStyle}}"
TargetType="dxe:ListBoxEditItem">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Border BorderThickness="2"
Background="Orange"
BorderBrush="Blue"
CornerRadius="4">
<TextBlock Text="{Binding}" Padding="2"/>
</Border>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</dxe:RadioListBoxEditStyleSettings.ItemContainerStyle>
</dxe:RadioListBoxEditStyleSettings>
</dxe:ListBoxEdit.StyleSettings>
</dxe:ListBoxEdit>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the StyleSettings 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.