TokenComboBoxStyleSettings.TokenBorderTemplate Property
In This Article
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
public ControlTemplate TokenBorderTemplate { get; set; }
#Property Value
Type | Description |
---|---|
Control |
A Control |
#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:TokenComboBoxStyleSettings>
<dxe:TokenComboBoxStyleSettings.TokenBorderTemplate>
<ControlTemplate TargetType="{x:Type ContentControl}">
<Border BorderThickness="3" BorderBrush="Red"
Background="WhiteSmoke" CornerRadius="4">
<ContentPresenter/>
</Border>
</ControlTemplate>
</dxe:TokenComboBoxStyleSettings.TokenBorderTemplate>
</dxe:TokenComboBoxStyleSettings>
</dxe:ComboBoxEdit.StyleSettings>
</dxe:ComboBoxEdit>
See Also