C# Class Wpf.Controls.TabControl

Inheritance: System.Windows.Controls.TabControl
Datei anzeigen Open project: Gainedge/BetterExplorer Class Usage Examples

Public Properties

Property Type Description
AddNewTabToEndProperty System.Windows.DependencyProperty
AllowAddNewProperty System.Windows.DependencyProperty
AllowDeleteProperty System.Windows.DependencyProperty
ConstructMoveToCopyToMenu System.Action
DefaultTabPathProperty System.Windows.DependencyProperty
IsUsingItemsSourceProperty System.Windows.DependencyProperty
IsUsingItemsSourcePropertyKey System.Windows.DependencyPropertyKey
NotTabItemNormalBackgroundProperty System.Windows.DependencyProperty
ReopenableTabs List
SelectNewTabOnCreateProperty System.Windows.DependencyProperty
StartUpLocation string
TabItemMaxHeightProperty System.Windows.DependencyProperty
TabItemMaxWidthProperty System.Windows.DependencyProperty
TabItemMinHeightProperty System.Windows.DependencyProperty
TabItemMinWidthProperty System.Windows.DependencyProperty
TabItemMouseOverBackgroundProperty System.Windows.DependencyProperty
TabItemNormalBackgroundProperty System.Windows.DependencyProperty
TabItemSelectedBackgroundProperty System.Windows.DependencyProperty
isGoingBackOrForward bool
newt_DragEnter DragEventHandler
newt_GiveFeedback GiveFeedbackEventHandler
newt_PreviewMouseDown MouseButtonEventHandler
newt_PreviewMouseMove MouseEventHandler

Private Properties

Property Type Description
CoerceMaxHeight object
CoerceMaxWidth object
CoerceMinHeight object
CoerceMinWidth object
ContextMenuItem_Click void
DropdownButton_Checked void
GetItems IEnumerable
GetTabItem TabItem
GetTabsCount int
InternalChildren IEnumerable
OnAllowAddNewChanged void
OnAllowDeleteChanged void
OnCoerceAllowAddNewCallback object
OnCoerceAllowAddNewCallback object
OnCoerceAllowDeleteCallback object
OnCoerceAllowDeleteNewCallback object
OnMinMaxChanged void
OnTabStripPlacementChanged void
SetAddNewButtonVisibility void
SetTabItemsCloseButtonVisibility void
TabControl System
TabControl_MouseDoubleClick void

Public Methods

Method Description
CloneTabItem ( TabItem theTab ) : void
CloseAllTabsButThis ( TabItem tabItem ) : void
NewTab ( IListItemEx DefPath, bool IsNavigate ) : TabItem

Creates a new tab, optionally selects it then erturns it

NewTab ( string Location, bool IsNavigate = false ) : TabItem

Creates a new tab, optionally selects it then erturns it

NewTab ( ) : void
OnApplyTemplate ( ) : void

OnApplyTemplate override

RaiseTabClick ( TabItem tab ) : void

Raises the OnTabClicked event if and only if tab is not nothing

ReOpenTab ( NavigationLog log ) : void

Re-opens a previously closed tab using that tab's navigation log data then removes it from reopenabletabs.

RemoveTabItem ( TabItem tabItem, System.Boolean allowReopening = true, System.Boolean isCloseLastTab = false ) : void

Called by a child Header that wants to remove itself by clicking on the close button

Protected Methods

Method Description
GetContainerForItemOverride ( ) : DependencyObject

GetContainerForItemOverride

IsItemItsOwnContainerOverride ( object item ) : bool

IsItemItsOwnContainerOverride

OnItemsChanged ( NotifyCollectionChangedEventArgs e ) : void
OnItemsSourceChanged ( IEnumerable oldValue, IEnumerable newValue ) : void
OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
OnSelectionChanged ( System.Windows.Controls.SelectionChangedEventArgs e ) : void

Private Methods

Method Description
CoerceMaxHeight ( DependencyObject d, object value ) : object
CoerceMaxWidth ( DependencyObject d, object value ) : object
CoerceMinHeight ( DependencyObject d, object value ) : object
CoerceMinWidth ( DependencyObject d, object value ) : object
ContextMenuItem_Click ( object sender, RoutedEventArgs e ) : void

Handle the MenuItem's Click event

DropdownButton_Checked ( object sender, RoutedEventArgs e ) : void

Handle the ToggleButton Checked event that displays a context menu of Header Headers

GetItems ( ) : IEnumerable
GetTabItem ( int index ) : TabItem
GetTabsCount ( ) : int
InternalChildren ( ) : IEnumerable
OnAllowAddNewChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnAllowDeleteChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnCoerceAllowAddNewCallback ( DependencyObject d, object basevalue ) : object
OnCoerceAllowAddNewCallback ( object basevalue ) : object
OnCoerceAllowDeleteCallback ( object basevalue ) : object
OnCoerceAllowDeleteNewCallback ( DependencyObject d, object basevalue ) : object
OnMinMaxChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

OnMinMaxChanged callback responds to any of the Min/Max dependency properties changing

OnTabStripPlacementChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

OnTabStripPlacementChanged property callback

We need to supplement the base implementation with this method as the base method does not work when we are using virtualization in the tabpanel, it only updates visible items

SetAddNewButtonVisibility ( ) : void
SetTabItemsCloseButtonVisibility ( ) : void
TabControl ( ) : System
TabControl_MouseDoubleClick ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Method Details

CloneTabItem() public method

public CloneTabItem ( TabItem theTab ) : void
theTab TabItem
return void

CloseAllTabsButThis() public method

public CloseAllTabsButThis ( TabItem tabItem ) : void
tabItem TabItem
return void

GetContainerForItemOverride() protected method

GetContainerForItemOverride
protected GetContainerForItemOverride ( ) : DependencyObject
return System.Windows.DependencyObject

IsItemItsOwnContainerOverride() protected method

IsItemItsOwnContainerOverride
protected IsItemItsOwnContainerOverride ( object item ) : bool
item object
return bool

NewTab() public method

Creates a new tab, optionally selects it then erturns it
public NewTab ( IListItemEx DefPath, bool IsNavigate ) : TabItem
DefPath IListItemEx The that represents the location of this tab
IsNavigate bool Do you want the new tab to be selected?
return TabItem

NewTab() public method

Creates a new tab, optionally selects it then erturns it
public NewTab ( string Location, bool IsNavigate = false ) : TabItem
Location string The file path of the new Tab
IsNavigate bool Do you want the new tab to be selected?
return TabItem

NewTab() public method

public NewTab ( ) : void
return void

OnApplyTemplate() public method

OnApplyTemplate override
public OnApplyTemplate ( ) : void
return void

OnItemsChanged() protected method

protected OnItemsChanged ( NotifyCollectionChangedEventArgs e ) : void
e System.Collections.Specialized.NotifyCollectionChangedEventArgs
return void

OnItemsSourceChanged() protected method

protected OnItemsSourceChanged ( IEnumerable oldValue, IEnumerable newValue ) : void
oldValue IEnumerable
newValue IEnumerable
return void

OnPreviewKeyDown() protected method

protected OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs
return void

OnSelectionChanged() protected method

protected OnSelectionChanged ( System.Windows.Controls.SelectionChangedEventArgs e ) : void
e System.Windows.Controls.SelectionChangedEventArgs
return void

RaiseTabClick() public method

Raises the OnTabClicked event if and only if tab is not nothing
public RaiseTabClick ( TabItem tab ) : void
tab TabItem The tab you want to raise the event on
return void

ReOpenTab() public method

Re-opens a previously closed tab using that tab's navigation log data then removes it from reopenabletabs.
public ReOpenTab ( NavigationLog log ) : void
log NavigationLog The navigation log data from the previously closed tab.
return void

RemoveTabItem() public method

Called by a child Header that wants to remove itself by clicking on the close button
public RemoveTabItem ( TabItem tabItem, System.Boolean allowReopening = true, System.Boolean isCloseLastTab = false ) : void
tabItem TabItem
allowReopening System.Boolean
isCloseLastTab System.Boolean
return void

Property Details

AddNewTabToEndProperty public_oe static_oe property

public static DependencyProperty,System.Windows AddNewTabToEndProperty
return System.Windows.DependencyProperty

AllowAddNewProperty public_oe static_oe property

public static DependencyProperty,System.Windows AllowAddNewProperty
return System.Windows.DependencyProperty

AllowDeleteProperty public_oe static_oe property

public static DependencyProperty,System.Windows AllowDeleteProperty
return System.Windows.DependencyProperty

ConstructMoveToCopyToMenu public_oe property

An Action that is fired after a new tab is created
public Action,System ConstructMoveToCopyToMenu
return System.Action

DefaultTabPathProperty public_oe static_oe property

public static DependencyProperty,System.Windows DefaultTabPathProperty
return System.Windows.DependencyProperty

IsUsingItemsSourceProperty public_oe static_oe property

public static DependencyProperty,System.Windows IsUsingItemsSourceProperty
return System.Windows.DependencyProperty

IsUsingItemsSourcePropertyKey public_oe static_oe property

public static DependencyPropertyKey,System.Windows IsUsingItemsSourcePropertyKey
return System.Windows.DependencyPropertyKey

NotTabItemNormalBackgroundProperty public_oe static_oe property

public static DependencyProperty,System.Windows NotTabItemNormalBackgroundProperty
return System.Windows.DependencyProperty

ReopenableTabs public_oe property

List of tabs that can be reopened by the user
public List ReopenableTabs
return List

SelectNewTabOnCreateProperty public_oe static_oe property

public static DependencyProperty,System.Windows SelectNewTabOnCreateProperty
return System.Windows.DependencyProperty

StartUpLocation public_oe property

public string StartUpLocation
return string

TabItemMaxHeightProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemMaxHeightProperty
return System.Windows.DependencyProperty

TabItemMaxWidthProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemMaxWidthProperty
return System.Windows.DependencyProperty

TabItemMinHeightProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemMinHeightProperty
return System.Windows.DependencyProperty

TabItemMinWidthProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemMinWidthProperty
return System.Windows.DependencyProperty

TabItemMouseOverBackgroundProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemMouseOverBackgroundProperty
return System.Windows.DependencyProperty

TabItemNormalBackgroundProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemNormalBackgroundProperty
return System.Windows.DependencyProperty

TabItemSelectedBackgroundProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemSelectedBackgroundProperty
return System.Windows.DependencyProperty

isGoingBackOrForward public_oe property

public bool isGoingBackOrForward
return bool

newt_DragEnter public_oe property

public DragEventHandler newt_DragEnter
return DragEventHandler

newt_GiveFeedback public_oe property

public GiveFeedbackEventHandler newt_GiveFeedback
return GiveFeedbackEventHandler

newt_PreviewMouseDown public_oe property

public MouseButtonEventHandler newt_PreviewMouseDown
return MouseButtonEventHandler

newt_PreviewMouseMove public_oe property

public MouseEventHandler newt_PreviewMouseMove
return MouseEventHandler