Back to Devexpress

DXTabControl.ContentHostTemplate Property

wpf-devexpress-dot-xpf-dot-core-dot-dxtabcontrol-6a3ed020.md

latest2.1 KB
Original Source

DXTabControl.ContentHostTemplate Property

Gets or sets a template used to visualize the Tab Control’s content host.

Namespace : DevExpress.Xpf.Core

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public DataTemplate ContentHostTemplate { get; set; }
vb
Public Property ContentHostTemplate As DataTemplate

Property Value

TypeDescription
DataTemplate

A DataTemplate object that visualizes the Tab Control’s content host.

|

Remarks

When implementing the ContentHostTemplate data template, use the ContentHost element to specify where the content should be placed.

xaml
<Grid>
    <Grid.Resources>
        <DataTemplate x:Key="ContentHostTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="50"/>
                    <ColumnDefinition />
                    <ColumnDefinition Width="50"/>
                </Grid.ColumnDefinitions>
                <Border Grid.Column="0" Height="Auto" Background="Aqua" />
                <!-- dx:ContentHost element specifies where the content should be placed -->
                <dx:ContentHost Grid.Column="1" />
                <Border Grid.Column="2" Height="Auto" Background="Yellow" />
            </Grid>
        </DataTemplate>
    </Grid.Resources>
    <dx:DXTabControl ... ContentHostTemplate="{StaticResource ContentHostTemplate}"/>
</Grid>

See Also

DXTabControl Class

DXTabControl Members

DevExpress.Xpf.Core Namespace