Skip to main content
A newer version of this page is available. .

BaseEdit.BorderTemplate Property

Gets or sets a template used to display the editor’s border. This is a dependency property.

Namespace: DevExpress.Xpf.Editors

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

Declaration

[Browsable(false)]
public ControlTemplate BorderTemplate { get; set; }

Property Value

Type Description
ControlTemplate

A ControlTemplate object representing the template that defines the appearance of the editor’s border.

Remarks

To customize the editor’s visual representation via templates, use its BaseEdit.DisplayTemplate and BaseEdit.EditTemplate properties.

Example

The following example shows how to customize the editor's border via templates.

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Class="BaseEdit_BorderTemplate.Window1" 
        Title="Customizing Editor's Border"
        Height="300" Width="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="100" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="22" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <dxe:TextEdit Grid.Column="1" Grid.Row="1">
            <dxe:TextEdit.BorderTemplate>
                <ControlTemplate TargetType="{x:Type ContentControl}">
                    <Border BorderThickness="1" BorderBrush="Red" Background="AntiqueWhite"
                            CornerRadius="2">
                        <ContentPresenter />
                    </Border>
                </ControlTemplate>
            </dxe:TextEdit.BorderTemplate>
        </dxe:TextEdit>
    </Grid>
</Window>

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

See Also