Skip to main content

TokenComboBoxStyleSettings.TokenStyle Property

Gets or sets the appearance settings applied to tokens.

Namespace: DevExpress.Xpf.Editors

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

NuGet Package: DevExpress.Wpf.Core

Declaration

public Style TokenStyle { get; set; }

Property Value

Type Description
Style

A Style object that is the style applied to tokens.

Remarks

Use the TokenStyle property to specify a custom token style.

The following example demonstrates how to specify a custom token style for a combo box editor.

<Window ... 
    xmlns:dxei="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal" >
<Window.Resources>
    <Style x:Key="tokenStyle" TargetType="{x:Type dxei:TokenEditorPresenter}">
        <Setter Property="NewTokenText" Value="Add..."/>
        <Setter Property="Foreground" Value="Red"/>
        <Setter Property="FontWeight" Value="Bold"/>
    </Style>
</Window.Resources>
...
<dxe:ComboBoxEdit HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="150">
    <dxe:ComboBoxEdit.StyleSettings>
        <dxe:CheckedTokenComboBoxStyleSettings TokenStyle="{StaticResource tokenStyle}"/>
    </dxe:ComboBoxEdit.StyleSettings>
    <dxe:ComboBoxEditItem Content="Item 1"/>
    <dxe:ComboBoxEditItem Content="Item 2"/>
    <dxe:ComboBoxEditItem Content="Item 3"/>
    <dxe:ComboBoxEditItem Content="Item 4"/>
</dxe:ComboBoxEdit>
...
See Also