CheckedTokenComboBoxStyleSettings.TokenBorderTemplate Property
Gets or sets the ControlTemplate used to render the border and background area of a token. This is a dependency property.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
ControlTemplate | A ControlTemplate object that specifies the visual structure of the token’s border and background area. |
Remarks
The TokenBorderTemplate property allows you to customize the token’s border representation by using templates.
The code sample below demonstrates how to display a custom border around the tokens and alter the token’s background color.
<dxe:ComboBoxEdit ItemsSource="{Binding Customers}">
<dxe:ComboBoxEdit.StyleSettings>
<dxe:CheckedTokenComboBoxStyleSettings>
<dxe:CheckedTokenComboBoxStyleSettings.TokenBorderTemplate>
<ControlTemplate TargetType="{x:Type ContentControl}">
<Border BorderThickness="3" BorderBrush="Red"
Background="WhiteSmoke" CornerRadius="4">
<ContentPresenter/>
</Border>
</ControlTemplate>
</dxe:CheckedTokenComboBoxStyleSettings.TokenBorderTemplate>
</dxe:CheckedTokenComboBoxStyleSettings>
</dxe:ComboBoxEdit.StyleSettings>
</dxe:ComboBoxEdit>
See Also