Table of Contents

Class TabControlEx

Namespace
HeBianGu.Control.Dock.Controls
Assembly
HeBianGu.Control.Dock.dll

This control added to mitigate issue with tab (document) switching speed See this https://stackoverflow.com/questions/2080764/how-to-preserve-control-state-within-tab-items-in-a-tabcontrol and this https://stackoverflow.com/questions/31030293/cefsharp-in-tabcontrol-not-working/37171847#37171847

by implmenting an option to enable virtualization for tabbed document containers.

[TemplatePart(Name = "PART_ItemsHolder", Type = typeof(Panel))]
public class TabControlEx : TabControl, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IContainItemStorage, IAddChild
Inheritance
TabControlEx
Implements
Derived
Inherited Members
Extension Methods

Constructors

TabControlEx()

Class constructor

protected TabControlEx()

TabControlEx(bool)

Class constructor from virtualization parameter.

public TabControlEx(bool isVirtualizing)

Parameters

isVirtualizing bool

Whether tabbed items are virtualized or not.

Properties

IsVirtualiting

Gets whether the control and its inheriting classes are virtualizing their items or not.

[Bindable(false)]
public bool IsVirtualiting { get; }

Property Value

bool

Methods

GetSelectedTabItem()

Gets the currently selected item (including its generation if Virtualization is currently switched on).

protected TabItem GetSelectedTabItem()

Returns

TabItem

OnApplyTemplate()

Get the ItemsHolder and generate any children

public override void OnApplyTemplate()

OnItemsChanged(NotifyCollectionChangedEventArgs)

When the items change we remove any generated panel children and add any new ones as necessary

protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)

Parameters

e NotifyCollectionChangedEventArgs

OnSelectionChanged(SelectionChangedEventArgs)

Raises the SelectionChanged routed event.

protected override void OnSelectionChanged(SelectionChangedEventArgs e)

Parameters

e SelectionChangedEventArgs

Provides data for SelectionChangedEventArgs.