C# Class Wpf.Controls.TabControl

Inheritance: System.Windows.Controls.TabControl
Afficher le fichier Open project: Gainedge/BetterExplorer Class Usage Examples

Méthodes publiques

Свойство 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

Свойство 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

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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

Méthode 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 méthode

public CloneTabItem ( TabItem theTab ) : void
theTab TabItem
Résultat void

CloseAllTabsButThis() public méthode

public CloseAllTabsButThis ( TabItem tabItem ) : void
tabItem TabItem
Résultat void

GetContainerForItemOverride() protected méthode

GetContainerForItemOverride
protected GetContainerForItemOverride ( ) : DependencyObject
Résultat System.Windows.DependencyObject

IsItemItsOwnContainerOverride() protected méthode

IsItemItsOwnContainerOverride
protected IsItemItsOwnContainerOverride ( object item ) : bool
item object
Résultat bool

NewTab() public méthode

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?
Résultat TabItem

NewTab() public méthode

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?
Résultat TabItem

NewTab() public méthode

public NewTab ( ) : void
Résultat void

OnApplyTemplate() public méthode

OnApplyTemplate override
public OnApplyTemplate ( ) : void
Résultat void

OnItemsChanged() protected méthode

protected OnItemsChanged ( NotifyCollectionChangedEventArgs e ) : void
e System.Collections.Specialized.NotifyCollectionChangedEventArgs
Résultat void

OnItemsSourceChanged() protected méthode

protected OnItemsSourceChanged ( IEnumerable oldValue, IEnumerable newValue ) : void
oldValue IEnumerable
newValue IEnumerable
Résultat void

OnPreviewKeyDown() protected méthode

protected OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs
Résultat void

OnSelectionChanged() protected méthode

protected OnSelectionChanged ( System.Windows.Controls.SelectionChangedEventArgs e ) : void
e System.Windows.Controls.SelectionChangedEventArgs
Résultat void

RaiseTabClick() public méthode

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
Résultat void

ReOpenTab() public méthode

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.
Résultat void

RemoveTabItem() public méthode

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
Résultat void

Property Details

AddNewTabToEndProperty public_oe static_oe property

public static DependencyProperty,System.Windows AddNewTabToEndProperty
Résultat System.Windows.DependencyProperty

AllowAddNewProperty public_oe static_oe property

public static DependencyProperty,System.Windows AllowAddNewProperty
Résultat System.Windows.DependencyProperty

AllowDeleteProperty public_oe static_oe property

public static DependencyProperty,System.Windows AllowDeleteProperty
Résultat System.Windows.DependencyProperty

ConstructMoveToCopyToMenu public_oe property

An Action that is fired after a new tab is created
public Action,System ConstructMoveToCopyToMenu
Résultat System.Action

DefaultTabPathProperty public_oe static_oe property

public static DependencyProperty,System.Windows DefaultTabPathProperty
Résultat System.Windows.DependencyProperty

IsUsingItemsSourceProperty public_oe static_oe property

public static DependencyProperty,System.Windows IsUsingItemsSourceProperty
Résultat System.Windows.DependencyProperty

IsUsingItemsSourcePropertyKey public_oe static_oe property

public static DependencyPropertyKey,System.Windows IsUsingItemsSourcePropertyKey
Résultat System.Windows.DependencyPropertyKey

NotTabItemNormalBackgroundProperty public_oe static_oe property

public static DependencyProperty,System.Windows NotTabItemNormalBackgroundProperty
Résultat System.Windows.DependencyProperty

ReopenableTabs public_oe property

List of tabs that can be reopened by the user
public List ReopenableTabs
Résultat List

SelectNewTabOnCreateProperty public_oe static_oe property

public static DependencyProperty,System.Windows SelectNewTabOnCreateProperty
Résultat System.Windows.DependencyProperty

StartUpLocation public_oe property

public string StartUpLocation
Résultat string

TabItemMaxHeightProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemMaxHeightProperty
Résultat System.Windows.DependencyProperty

TabItemMaxWidthProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemMaxWidthProperty
Résultat System.Windows.DependencyProperty

TabItemMinHeightProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemMinHeightProperty
Résultat System.Windows.DependencyProperty

TabItemMinWidthProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemMinWidthProperty
Résultat System.Windows.DependencyProperty

TabItemMouseOverBackgroundProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemMouseOverBackgroundProperty
Résultat System.Windows.DependencyProperty

TabItemNormalBackgroundProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemNormalBackgroundProperty
Résultat System.Windows.DependencyProperty

TabItemSelectedBackgroundProperty public_oe static_oe property

public static DependencyProperty,System.Windows TabItemSelectedBackgroundProperty
Résultat System.Windows.DependencyProperty

isGoingBackOrForward public_oe property

public bool isGoingBackOrForward
Résultat bool

newt_DragEnter public_oe property

public DragEventHandler newt_DragEnter
Résultat DragEventHandler

newt_GiveFeedback public_oe property

public GiveFeedbackEventHandler newt_GiveFeedback
Résultat GiveFeedbackEventHandler

newt_PreviewMouseDown public_oe property

public MouseButtonEventHandler newt_PreviewMouseDown
Résultat MouseButtonEventHandler

newt_PreviewMouseMove public_oe property

public MouseEventHandler newt_PreviewMouseMove
Résultat MouseEventHandler