Back to Devexpress

ContentHost Class

wpf-devexpress-dot-xpf-dot-core-b8150906.md

latest2.5 KB
Original Source

ContentHost Class

An element used to specify where the content should be placed when implementing the DXTabControl.ContentHostTemplate data template.

Namespace : DevExpress.Xpf.Core

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public class ContentHost :
    ContentHostBase
vb
Public Class ContentHost
    Inherits ContentHostBase

Remarks

When implementing the DXTabControl.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>

Inheritance

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Panel DevExpress.Xpf.Core.Native.ContentHostBase ContentHost

See Also

ContentHost Members

DevExpress.Xpf.Core Namespace