C# Класс Wpf.Controls.TabControl

Наследование: System.Windows.Controls.TabControl
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

CloneTabItem() публичный Метод

public CloneTabItem ( TabItem theTab ) : void
theTab TabItem
Результат void

CloseAllTabsButThis() публичный Метод

public CloseAllTabsButThis ( TabItem tabItem ) : void
tabItem TabItem
Результат void

GetContainerForItemOverride() защищенный Метод

GetContainerForItemOverride
protected GetContainerForItemOverride ( ) : DependencyObject
Результат System.Windows.DependencyObject

IsItemItsOwnContainerOverride() защищенный Метод

IsItemItsOwnContainerOverride
protected IsItemItsOwnContainerOverride ( object item ) : bool
item object
Результат bool

NewTab() публичный Метод

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?
Результат TabItem

NewTab() публичный Метод

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?
Результат TabItem

NewTab() публичный Метод

public NewTab ( ) : void
Результат void

OnApplyTemplate() публичный Метод

OnApplyTemplate override
public OnApplyTemplate ( ) : void
Результат void

OnItemsChanged() защищенный Метод

protected OnItemsChanged ( NotifyCollectionChangedEventArgs e ) : void
e System.Collections.Specialized.NotifyCollectionChangedEventArgs
Результат void

OnItemsSourceChanged() защищенный Метод

protected OnItemsSourceChanged ( IEnumerable oldValue, IEnumerable newValue ) : void
oldValue IEnumerable
newValue IEnumerable
Результат void

OnPreviewKeyDown() защищенный Метод

protected OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs
Результат void

OnSelectionChanged() защищенный Метод

protected OnSelectionChanged ( System.Windows.Controls.SelectionChangedEventArgs e ) : void
e System.Windows.Controls.SelectionChangedEventArgs
Результат void

RaiseTabClick() публичный Метод

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
Результат void

ReOpenTab() публичный Метод

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.
Результат void

RemoveTabItem() публичный Метод

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
Результат void

Описание свойств

AddNewTabToEndProperty публичное статическое свойство

public static DependencyProperty,System.Windows AddNewTabToEndProperty
Результат System.Windows.DependencyProperty

AllowAddNewProperty публичное статическое свойство

public static DependencyProperty,System.Windows AllowAddNewProperty
Результат System.Windows.DependencyProperty

AllowDeleteProperty публичное статическое свойство

public static DependencyProperty,System.Windows AllowDeleteProperty
Результат System.Windows.DependencyProperty

ConstructMoveToCopyToMenu публичное свойство

An Action that is fired after a new tab is created
public Action,System ConstructMoveToCopyToMenu
Результат System.Action

DefaultTabPathProperty публичное статическое свойство

public static DependencyProperty,System.Windows DefaultTabPathProperty
Результат System.Windows.DependencyProperty

IsUsingItemsSourceProperty публичное статическое свойство

public static DependencyProperty,System.Windows IsUsingItemsSourceProperty
Результат System.Windows.DependencyProperty

IsUsingItemsSourcePropertyKey публичное статическое свойство

public static DependencyPropertyKey,System.Windows IsUsingItemsSourcePropertyKey
Результат System.Windows.DependencyPropertyKey

NotTabItemNormalBackgroundProperty публичное статическое свойство

public static DependencyProperty,System.Windows NotTabItemNormalBackgroundProperty
Результат System.Windows.DependencyProperty

ReopenableTabs публичное свойство

List of tabs that can be reopened by the user
public List ReopenableTabs
Результат List

SelectNewTabOnCreateProperty публичное статическое свойство

public static DependencyProperty,System.Windows SelectNewTabOnCreateProperty
Результат System.Windows.DependencyProperty

StartUpLocation публичное свойство

public string StartUpLocation
Результат string

TabItemMaxHeightProperty публичное статическое свойство

public static DependencyProperty,System.Windows TabItemMaxHeightProperty
Результат System.Windows.DependencyProperty

TabItemMaxWidthProperty публичное статическое свойство

public static DependencyProperty,System.Windows TabItemMaxWidthProperty
Результат System.Windows.DependencyProperty

TabItemMinHeightProperty публичное статическое свойство

public static DependencyProperty,System.Windows TabItemMinHeightProperty
Результат System.Windows.DependencyProperty

TabItemMinWidthProperty публичное статическое свойство

public static DependencyProperty,System.Windows TabItemMinWidthProperty
Результат System.Windows.DependencyProperty

TabItemMouseOverBackgroundProperty публичное статическое свойство

public static DependencyProperty,System.Windows TabItemMouseOverBackgroundProperty
Результат System.Windows.DependencyProperty

TabItemNormalBackgroundProperty публичное статическое свойство

public static DependencyProperty,System.Windows TabItemNormalBackgroundProperty
Результат System.Windows.DependencyProperty

TabItemSelectedBackgroundProperty публичное статическое свойство

public static DependencyProperty,System.Windows TabItemSelectedBackgroundProperty
Результат System.Windows.DependencyProperty

isGoingBackOrForward публичное свойство

public bool isGoingBackOrForward
Результат bool

newt_DragEnter публичное свойство

public DragEventHandler newt_DragEnter
Результат DragEventHandler

newt_GiveFeedback публичное свойство

public GiveFeedbackEventHandler newt_GiveFeedback
Результат GiveFeedbackEventHandler

newt_PreviewMouseDown публичное свойство

public MouseButtonEventHandler newt_PreviewMouseDown
Результат MouseButtonEventHandler

newt_PreviewMouseMove публичное свойство

public MouseEventHandler newt_PreviewMouseMove
Результат MouseEventHandler