menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DockedElementTabbedHost - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DockedElementTabbedHost

    Represents a control that contains multiple items.

    Inheritance
    System.Object
    DockedElementTabbedHost
    Implements
    IDesiredSize
    System.IDisposable
    Namespace: Syncfusion.Windows.Tools.Controls
    Assembly: Syncfusion.Tools.Wpf.dll
    Syntax
    public class DockedElementTabbedHost : ContentControl, IChildrenResize, IDesiredSize, IDisposable
    Remarks

    You can use DockedElementTabbedHost class when you need to show tabs in the element. When there is no need to show tabs in the element you have to use DockedElementTabbedHost class.

    Examples

    This example shows how to initialize the template of the DockedElementTabbedHost class in XAML.

    <ControlTemplate x:Key="DockedElementTabbedHostTabbedTemplate" TargetType="{x:Type Syncfusion:DockedElementTabbedHost}">
    <Border x:Name="BorderWrapForTab" Width="Auto" SnapsToDevicePixels="True" Background="Transparent">
    <DockPanel x:Name="DockPanel" Width="Auto" LastChildFill="True">
    <Syncfusion:DockHeaderPresenter x:Name="header" DockPanel.Dock="Top" RenderTransformOrigin="0.5,0.5"
    Style="{Binding Path=(Syncfusion:DockingManager.DockHeaderStyle)
    , RelativeSource={RelativeSource AncestorType={x:Type Syncfusion:DockingManager}}}"
    IsTemplateParenKeyboardFocusWithin="{TemplateBinding IsKeyboardFocusWithin}"
    />
    <Grid>
    <TabControl Name="PART_TabControl"
    ItemsSource="{TemplateBinding TabChildren}" IsSynchronizedWithCurrentItem="True" Padding="0"
    Style="{Binding Path=(Syncfusion:DockingManager.TabControlStyle)
    , RelativeSource={RelativeSource AncestorType={x:Type Syncfusion:DockingManager}}}"
    TabStripPlacement="{Binding Path=(Syncfusion:DockingManager.DockTabAlignment)
    , RelativeSource={RelativeSource AncestorType={x:Type Syncfusion:DockingManager}}}"
    />
    <Border Name="PART_CoverletControl" Visibility="Collapsed" Background="Transparent" />
    </Grid>
    </DockPanel>
    </Border>
    </ControlTemplate>

    Constructors

    DockedElementTabbedHost(DockingManager)

    Initializes a new instance of the DockedElementTabbedHost class.

    Declaration
    public DockedElementTabbedHost(DockingManager docking)
    Parameters
    Type Name Description
    DockingManager docking

    The docking.

    Fields

    CanAutoHideGroupProperty

    Identifies DockedElementTabbedHost CanAutoHideGroup dependency property.

    Declaration
    public static readonly DependencyProperty CanAutoHideGroupProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    CanCloseGroupProperty

    Identifies DockedElementTabbedHost CanCloseGroup dependency property.

    Declaration
    public static readonly DependencyProperty CanCloseGroupProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    DockingManagerProperty

    Identifies the Docking Manager dependency Property

    Declaration
    public static readonly DependencyProperty DockingManagerProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    HostedElementProperty

    Identifies DockedElementTabbedHost HostedElement dependency property.

    Declaration
    public static readonly DependencyProperty HostedElementProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    MarkAsFrozenProperty

    Identifies the MarkAsFrozen Dependency property

    Declaration
    public static readonly DependencyProperty MarkAsFrozenProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ShowTabsProperty

    Identifies DockedElementTabbedHost ShowTabs dependency property.

    Declaration
    public static readonly DependencyProperty ShowTabsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    StateProperty

    Identifies DockedElementTabbedHost State dependency property.

    Declaration
    public static readonly DependencyProperty StateProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    TabChildrenProperty

    This DependencyProperty contains tab children collection.

    Declaration
    public static readonly DependencyProperty TabChildrenProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    TabChildrenPropertyKey

    DependencyPropertyKey for tab children collection

    Declaration
    protected static readonly DependencyPropertyKey TabChildrenPropertyKey
    Field Value
    Type
    System.Windows.DependencyPropertyKey

    TabOrderInDockModeProperty

    Identifies DockedElementTabbedHost TabOrderInDockMode attached property.

    Declaration
    public static readonly DependencyProperty TabOrderInDockModeProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    This property can be attached to docking manager child and is used for ordering the tabs in DockedElementTabbedHost instance in docked state. The default number is 0.

    TabOrderInFloatModeProperty

    Identifies DockedElementTabbedHost TabOrderInFloatMode attached property.

    Declaration
    public static readonly DependencyProperty TabOrderInFloatModeProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    This property can be attached to docking manager child and is used for ordering the tabs in DockedElementTabbedHost instance in floating state. The default number is 0.

    Properties

    CanAutoHideGroup

    Gets or sets a value indicating whether a Boolean value that indicates whether to allow group auto hide This is a dependency property.

    Declaration
    public bool CanAutoHideGroup { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    CanAutoHideGroup property is used by DockedElementTabbedHost to know whether all tabs can be auto hidden if DockingManager.AutoHideTabsMode is set to AutoHideGroup. This allows prevent moving the entire group of tabs to auto hidden state through GUI by hiding awl button in header and disabling AutoHide context menu item.

    CanCloseGroup

    Gets or sets a value indicating whether a Boolean value that indicates whether to allow group close. This is a dependency property.

    Declaration
    public bool CanCloseGroup { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    CanCloseGroup property is used by DockedElementTabbedHost to know whether all tabs can be hidden if DockingManager.CloseTabs mode is set to CloseAll.This allows prevent moving the entire group of tabs to hidden state through GUI by hiding close button in header and disabling Hide context menu item.

    DockingManager

    Gets or sets the docking manager.

    Declaration
    public DockingManager DockingManager { get; set; }
    Property Value
    Type Description
    DockingManager

    The docking manager.

    HostedElement

    Gets or sets a value indicating whether an element that is hosted in DockedElementTabbedHost. This is a dependency property.

    Declaration
    public FrameworkElement HostedElement { get; set; }
    Property Value
    Type
    System.Windows.FrameworkElement
    Remarks

    HostedElement property is useful when you want to get or set element of the DockedElementTabbedHost. You can use HostedElement property when you override style of the DockedElementTabbedHost.

    Examples

    This example shows how to use HostedElement property in XAML.

      <Style x:Key="DockedElementTabbedHostStyle" TargetType="{x:Type Syncfusion:DockedElementTabbedHost}">
        <Setter Property="DataContext" Value="{Binding Path=(Syncfusion:DockedElementTabbedHost.HostedElement), RelativeSource={RelativeSource Self}}"/>
        <Setter Property="Template" Value="{StaticResource DockedElementTabbedHostTemplate}" />
      </Style>

    IsChildFocused

    Gets or sets a value indicating whether the value indicating whether one of the children is focused.

    Declaration
    protected bool IsChildFocused { get; set; }
    Property Value
    Type
    System.Boolean

    MarkAsFrozen

    Gets or sets a value indicating whether element is marked as frozen. This is a dependency property.

    Declaration
    public bool MarkAsFrozen { get; set; }
    Property Value
    Type
    System.Boolean

    ShowTabs

    Gets or sets a value indicating whether a Boolean value that indicates whether to show tabs. This is a dependency property.

    Declaration
    public bool ShowTabs { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    ShowTabs property is used for DockedElementTabbedHost to determine whether it should show tabs or not. For example if number of tabs is 1 there is no necessary to display it alone and this property should be set to false in that case.

    State

    Gets or sets a value indicating whether a dock state for the DockedElementTabbedHost instance. This is a dependency property.

    Declaration
    public DockState State { get; set; }
    Property Value
    Type
    DockState
    Remarks

    State property is used to know what desired size of hosted element ( dock or float) use to calculate final size of host. You can use State property when you override templates of the dock or float windows.

    Examples

    This example shows how to use State property in XAML. If you override the template of the float window, you have to hide context menu button and auto-hide button of the floating window header.

    <DataTrigger Binding="{Binding Path=(FrameworkElement.DataContext).(Syncfusion:DockingManager.State), RelativeSource={RelativeSource TemplatedParent}}"
    Value="Float" >
    <Setter TargetName="PART_AwlButton" Property="Visibility" Value="Collapsed" />
    <Setter TargetName="PART_ContextMenu" Property="IsEnabledAutoHideMenuItem" Value="False" />
    </DataTrigger>
    See Also
    DockState

    TabChildren

    Gets or sets a value indicating whether the collection of the tabs that should be displayed in tabbed mode.

    Declaration
    public ObservableFrameworkElements TabChildren { get; protected set; }
    Property Value
    Type
    ObservableFrameworkElements

    TabParent

    Gets or sets the tab parent.

    Declaration
    public FrameworkElement TabParent { get; set; }
    Property Value
    Type Description
    System.Windows.FrameworkElement

    The tab parent.

    Methods

    CoerceHostedElement(Object)

    Coerces hosted element to assure that it's visible.

    Declaration
    protected virtual object CoerceHostedElement(object baseValue)
    Parameters
    Type Name Description
    System.Object baseValue

    Hosted element.

    Returns
    Type Description
    System.Object

    BaseValue if it's acceptable, otherwise null.

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()

    Finalize()

    Releases unmanaged resources and performs other cleanup operations before the DockedElementTabbedHost is reclaimed by garbage collection.

    Declaration
    protected override void Finalize()

    GetTabOrder(DependencyObject, DockState)

    Gets tab order for a given DependencyObject in specified dock state.

    Declaration
    public static int GetTabOrder(DependencyObject obj, DockState state)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj

    The element from which to read the tab order.

    DockState state

    Dock state.

    Returns
    Type Description
    System.Int32

    The tab order in specified state.

    GetTabOrderInDockMode(DependencyObject)

    Gets the value of the DockedElementTabbedHost.TabOrderInDockMode�attached property from a given DependencyObject.

    Declaration
    public static int GetTabOrderInDockMode(DependencyObject obj)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj

    The element from which to read the property value.

    Returns
    Type Description
    System.Int32

    The value of the DockedElementTabbedHost.TabOrderInDockMode�attached property.

    GetTabOrderInFloatMode(DependencyObject)

    Gets the value of the DockedElementTabbedHost.TabOrderInFloatMode�attached property from a given DependencyObject.

    Declaration
    public static int GetTabOrderInFloatMode(DependencyObject obj)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj

    The element from which to read the property value.

    Returns
    Type Description
    System.Int32

    The value of the DockedElementTabbedHost.TabOrderInFloatMode�attached property.

    MeasureOverride(Size)

    Measures the size in layout required for child elements and determines a size for the DockedElementTabbedHost and derived class.

    Declaration
    protected override Size MeasureOverride(Size constraint)
    Parameters
    Type Name Description
    System.Windows.Size constraint

    The maximum size that the method can return.

    Returns
    Type Description
    System.Windows.Size

    The size that this element determines it needs during layout, based on its calculations of child element sizes.

    OnApplyTemplate()

    When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application

    Declaration
    public override void OnApplyTemplate()

    OnHostedElementChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises HostedElementChanged event.

    Declaration
    protected virtual void OnHostedElementChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    OnInitialized(EventArgs)

    Initializes data-bindings for the properties.

    Declaration
    protected override void OnInitialized(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The instance containing the event data.

    OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)

    Invoked just before the System.Windows.UIElement.IsKeyboardFocusWithinChanged event is raised by this element. Implement this method to add class handling for this event.

    Declaration
    protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    A System.Windows.DependencyPropertyChangedEventArgs that contains the event data.

    OnLostFocus(RoutedEventArgs)

    Raises the System.Windows.UIElement.LostFocus�routed event by using the event data that is provided. DockedElementTabbedHost uses LostFocus event to fire WindowDeactivated event.

    Declaration
    protected override void OnLostFocus(RoutedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.RoutedEventArgs e

    A System.Windows.RoutedEventArgs that contains event data. This event data must contain the identifier for the System.Windows.UIElement.LostFocus event.

    OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)

    This method keeps focus if content element FocusedProperty is set to false.

    Declaration
    protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyboardFocusChangedEventArgs e

    The instance containing the event data.

    OnMouseDown(MouseButtonEventArgs)

    Responds to System.Windows.UIElement.MouseDown event. Used to give a focus to the hosted element.

    Declaration
    protected override void OnMouseDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    Provides data for System.Windows.Input.MouseEventArgs.

    OnMouseEnter(MouseEventArgs)

    Declaration
    protected override void OnMouseEnter(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    OnMouseLeftButtonDown(MouseButtonEventArgs)

    Declaration
    protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    OnMouseMove(MouseEventArgs)

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs)

    Invoked when an unhandled �attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyboardFocusChangedEventArgs e

    The System.Windows.Input.KeyboardFocusChangedEventArgs that contains the event data.

    OnPreviewLostKeyboardFocus(KeyboardFocusChangedEventArgs)

    Invoked when an unhandled System.Windows.Input.Keyboard.PreviewKeyDown�attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnPreviewLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyboardFocusChangedEventArgs e

    The System.Windows.Input.KeyboardFocusChangedEventArgs that contains the event data.

    OnPreviewMouseDown(MouseButtonEventArgs)

    Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseDown attached�routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnPreviewMouseDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that one or more mouse buttons were pressed.

    OnPreviewMouseLeftButtonUp(MouseButtonEventArgs)

    Declaration
    protected override void OnPreviewMouseLeftButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    OnStateChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises StateChanged event.

    Declaration
    protected virtual void OnStateChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    RemoveElementFromParent(FrameworkElement)

    Invoke when removes the element from its parent to give it ability to be inserted into other container.

    Declaration
    public static void RemoveElementFromParent(FrameworkElement element)
    Parameters
    Type Name Description
    System.Windows.FrameworkElement element

    Element to be removed.

    RemoveFromParent()

    Removes current instance of DockedElementTabbedHost from parent.

    Declaration
    protected void RemoveFromParent()

    SetTabOrder(DependencyObject, DockState, Int32)

    Sets the tab order for a given DependencyObject in specified dock state.

    Declaration
    public static void SetTabOrder(DependencyObject obj, DockState state, int value)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj

    The element on which to set the tab order.

    DockState state

    Dock state.

    System.Int32 value

    The tab order to be set.

    SetTabOrderInDockMode(DependencyObject, Int32)

    Sets the value of the DockedElementTabbedHost.TabOrderInDockMode�attached property to a given DependencyObject.

    Declaration
    public static void SetTabOrderInDockMode(DependencyObject obj, int value)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj

    The element on which to set the DockedElementTabbedHost.TabOrderInDockMode�attached property.

    System.Int32 value

    The property value to set.

    SetTabOrderInFloatMode(DependencyObject, Int32)

    Sets the value of the DockedElementTabbedHost.TabOrderInFloatMode�attached property to a given DependencyObject.

    Declaration
    public static void SetTabOrderInFloatMode(DependencyObject obj, int value)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj

    The element on which to set the DockedElementTabbedHost.TabOrderInFloatMode�attached property.

    System.Int32 value

    The property value to set.

    Explicit Interface Implementations

    IDesiredSize.DesiredSize

    Gets or sets a value indicating whether the size that this element has as desired in it's current dock state.

    Declaration
    Size IDesiredSize.DesiredSize { get; set; }
    Returns
    Type Description
    System.Windows.Size

    Desired size of element in it's current state.

    IDisposable.Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    void IDisposable.Dispose()

    Implements

    IDesiredSize
    System.IDisposable

    See Also

    DockedElementTabbedHost
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved