Class TabItemExt
The TabItemExt can be used to include various tabbed elements in to the TabControlExt.
Inheritance
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
public class TabItemExt : TabItem
Examples
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Syncfusion.Windows.Tools.Controls;
namespace TabControlExt
{
///
/// Interaction logic for Window1.xaml
///
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
// Creating instance of the TabControlExt control
TabControlExt tabControlExt = new TabControlExt();
// Creating the instance of StackPanel
StackPanel stackPanel = new StackPanel();
// Creating instance of the TabItemExt
TabItemExt tabItemExt1 = new TabItemExt();
// Setting header of the TabItemExt
tabItemExt1.Header = "TabItemExt";
// Adding tabitemext to tabcontrolext
tabControlExt.Items.Add(tabItemExt1);
// Adding control to the stackpanel
stackPanel.Children.Add(tabControlExt);
}
}
}
Constructors
TabItemExt()
Initializes a new instance of the TabItemExt class.
Declaration
public TabItemExt()
Fields
AllowPinProperty
Declaration
public static readonly DependencyProperty AllowPinProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CanCloseProperty
Declaration
public static readonly DependencyProperty CanCloseProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CloseButtonStateProperty
Declaration
public static readonly DependencyProperty CloseButtonStateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ContextMenuItemsProperty
Represents the ContextMenuItemsPropertyKey Dependency property
Declaration
public static DependencyProperty ContextMenuItemsProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CustomEditableTemplateProperty
Represents the CustomEditableTemplateProperty Dependency property
Declaration
public static readonly DependencyProperty CustomEditableTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HeaderMarginProperty
Represents the HeaderMargin
Declaration
public static readonly DependencyProperty HeaderMarginProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HoverBackgroundProperty
Represents the HoverBackgroundProperty Dependency property
Declaration
public static readonly DependencyProperty HoverBackgroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IconMarginProperty
Declaration
public static readonly DependencyProperty IconMarginProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ImageAlignmentProperty
Represents the ImageAlignmentProperty Dependency property
Declaration
public static readonly DependencyProperty ImageAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ImageHeightProperty
Represents the ImageHeightProperty Dependency property
Declaration
public static readonly DependencyProperty ImageHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ImageProperty
Represents the ImageProperty Dependency property
Declaration
public static readonly DependencyProperty ImageProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ImageWidthProperty
Represents the ImageWidthProperty Dependency property
Declaration
public static readonly DependencyProperty ImageWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsPinnedProperty
Declaration
public static readonly DependencyProperty IsPinnedProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsTabEditingProperty
Represents the IsTabEditing dependency property
Declaration
public static readonly DependencyProperty IsTabEditingProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ItemToolTipProperty
Presents tool tip for item's header.
Declaration
public static readonly DependencyProperty ItemToolTipProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ShowPinProperty
Declaration
public static readonly DependencyProperty ShowPinProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TabIndexProperty
Represents the TabIndex Dependency property
Declaration
public static readonly DependencyProperty TabIndexProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TabItemContextMenuItemStyleProperty
Represents the TabItemContextMenuItemStyle Dependency property
Declaration
public static readonly DependencyProperty TabItemContextMenuItemStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TabItemContextMenuItemTemplateProperty
Represents the TabItemContextMenuItemTemplateProperty Dependency property
Declaration
public static readonly DependencyProperty TabItemContextMenuItemTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TabItemContextMenuStyleProperty
Represents the TabItemContextMenuStyle Dependency property
Declaration
public static readonly DependencyProperty TabItemContextMenuStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TabItemContextMenuTemplateProperty
Represents the TabItemContextMenuTemplate Dependency property
Declaration
public static readonly DependencyProperty TabItemContextMenuTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
UseCustomEditableTemplateProperty
Represents the UseCustomEditableTemplateProperty Dependency property
Declaration
public static readonly DependencyProperty UseCustomEditableTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
AllowPin
Gets or sets a value indicating whether the TabItemExt is pinnable or not.
Declaration
public bool AllowPin { get; set; }
Property Value
Type |
---|
System.Boolean |
CanClose
Gets ot sets a value indicating whether the TabItemExt is closable or not.
Declaration
public bool CanClose { get; set; }
Property Value
Type |
---|
System.Boolean |
CloseButtonState
Gets or sets the visibility of Close button in TabItemExt.
Declaration
public Visibility CloseButtonState { get; set; }
Property Value
Type |
---|
System.Windows.Visibility |
ContextMenuItems
Declaration
public ObservableCollection<object> ContextMenuItems { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<System.Object> |
CustomEditableTemplate
Gets or sets the value of the CustomEditableTemplate dependency property.
Declaration
public DataTemplate CustomEditableTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The custom editable template. |
HeaderMargin
Gets or sets the header margin.
Declaration
public Thickness HeaderMargin { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Thickness | The header margin. |
HoverBackground
Gets or sets the value of the HoverBackground dependency property.
Declaration
public Brush HoverBackground { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The hover background. |
IconMargin
Gets or sets the icon margin.
Declaration
public Thickness IconMargin { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Thickness | The icon margin. |
Image
Gets or sets the value of the Image dependency property.
Declaration
public ImageSource Image { get; set; }
Property Value
Type |
---|
System.Windows.Media.ImageSource |
ImageAlignment
Gets or sets the value of the ImageAlignment dependency property.
Declaration
public ImageAlignment ImageAlignment { get; set; }
Property Value
Type | Description |
---|---|
ImageAlignment | The image alignment. |
ImageHeight
Gets or sets height of the image.
Declaration
public double ImageHeight { get; set; }
Property Value
Type |
---|
System.Double |
ImageWidth
Gets or sets width of the image.
Declaration
public double ImageWidth { get; set; }
Property Value
Type |
---|
System.Double |
IsNewTab
Gets or Sets IsNewTab property
Declaration
public bool IsNewTab { get; set; }
Property Value
Type |
---|
System.Boolean |
IsPinned
Gets or sets a value indicating whether the TabItemExt is pinned in HeaderPanel or not.
Declaration
public bool IsPinned { get; set; }
Property Value
Type |
---|
System.Boolean |
IsTabEditing
Gets or sets a value indicating whether this instance is tab editing.
Declaration
public bool IsTabEditing { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ItemToolTip
Gets or sets the value of the ItemToolTip dependency property.
Declaration
public object ItemToolTip { get; set; }
Property Value
Type |
---|
System.Object |
ShowPin
Gets or sets a value indicating whether the pin button of TabItemExt should be visible or not.
Declaration
public bool ShowPin { get; set; }
Property Value
Type |
---|
System.Boolean |
TabIndex
Gets or sets a value that determines the order in which elements receive focus when the user navigates through controls by using the TAB key.
Declaration
public int TabIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
TabItemContextMenuItemStyle
Gets or sets the tab list context menu item style.
Declaration
public Style TabItemContextMenuItemStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Style | The tab list context menu item style. |
TabItemContextMenuItemTemplate
Gets or sets the value of the TabItemContextMenuItemTemplate dependency property.
Declaration
public DataTemplate TabItemContextMenuItemTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
TabItemContextMenuStyle
Gets or sets the tab list context menu style.
Declaration
public Style TabItemContextMenuStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Style | The tab list context menu style. |
TabItemContextMenuTemplate
Gets or sets the tab list context menu template.
Declaration
public ControlTemplate TabItemContextMenuTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Controls.ControlTemplate | The tab list context menu template. |
UseCustomEditableTemplate
Gets or sets a value indicating whether UseCustomEditableTemplate is true.
Declaration
public bool UseCustomEditableTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
MeasureOverride(Size)
Called to remeasure a control.
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 of the control, up to the maximum specified by |
OnApplyTemplate()
Calls on Apply Template
Declaration
public override void OnApplyTemplate()
OnContextMenuClosing(ContextMenuEventArgs)
Declaration
protected override void OnContextMenuClosing(ContextMenuEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.ContextMenuEventArgs | e |
OnContextMenuItemsChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises ContextMenuItemsChanged event.
Declaration
protected virtual void OnContextMenuItemsChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
---|
System.Windows.Automation.Peers.AutomationPeer |
OnCustomEditableTemplateChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises CustomEditableTemplateChanged event.
Declaration
protected virtual void OnCustomEditableTemplateChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnFlowDirectionChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises IsCloseTabProcessEnabledChanged event.
Declaration
protected virtual void OnFlowDirectionChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnHoverBackgroundChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises HoverBackgroundChanged event.
Declaration
protected virtual void OnHoverBackgroundChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnImageAlignmentChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises ImageAlignmentChanged event.
Declaration
protected virtual void OnImageAlignmentChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnImageChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises ImageChanged event.
Declaration
protected virtual void OnImageChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The System.Windows.RoutedEventArgs that contains the event data. |
OnItemToolTipChanged(DependencyPropertyChangedEventArgs)
Raises ItemToolTipChanged event.
Declaration
protected virtual void OnItemToolTipChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnMouseDoubleClick(MouseButtonEventArgs)
Raises the System.Windows.Controls.Control.MouseDoubleClick routed event.
Declaration
protected override void OnMouseDoubleClick(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The event data. |
OnMouseDown(MouseButtonEventArgs)
Event helps to close the tab item on mouse wheel click.
Declaration
protected override void OnMouseDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The event data. |
OnMouseLeave(MouseEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. |
OnMouseLeftButtonDown(MouseButtonEventArgs)
Responds to the System.Windows.ContentElement.MouseLeftButtonDown event.
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | Provides data for System.Windows.Input.MouseButtonEventArgs. |
OnMouseMove(MouseEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseMove 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 OnMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. |
OnMouseRightButtonUp(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.UIElement.MouseRightButtonUp 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 OnMouseRightButtonUp(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 the right mouse button was released. |
OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Announces that the keyboard is focused on this element.
Declaration
protected override void OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyboardFocusChangedEventArgs | e | Keyboard input event arguments. |
OnPropertyChanged(DependencyPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e |
OnSelected(RoutedEventArgs)
Declaration
protected override void OnSelected(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.RoutedEventArgs | e |
OnTabItemContextMenuItemTemplateChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises TabItemContextMenuItemTemplateChanged event.
Declaration
protected virtual void OnTabItemContextMenuItemTemplateChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnUseCustomEditableTemplateChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises UseCustomEditableTemplateChanged event.
Declaration
protected virtual void OnUseCustomEditableTemplateChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
Events
ContextMenuItemsChanged
Event that is raised when ContextMenuItems property is changed.
Declaration
public event PropertyChangedCallback ContextMenuItemsChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
CustomEditableTemplateChanged
Event that is raised when CustomEditableTemplate property is changed.
Declaration
public event PropertyChangedCallback CustomEditableTemplateChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
FlowDirectionChanged
Event that is raised when FlowDirection property is changed.
Declaration
public event PropertyChangedCallback FlowDirectionChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
HoverBackgroundChanged
Event that is raised when HoverBackground property is changed.
Declaration
public event PropertyChangedCallback HoverBackgroundChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ImageAlignmentChanged
Event that is raised when ImageAlignment property is changed.
Declaration
public event PropertyChangedCallback ImageAlignmentChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ImageChanged
Event that is raised when Image property is changed.
Declaration
public event PropertyChangedCallback ImageChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ItemToolTipChanged
Event that is raised when ItemToolTip property is changed.
Declaration
public event PropertyChangedCallback ItemToolTipChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
TabItemContextMenuItemTemplateChanged
Event that is raised when TabItemContextMenuItemTemplate property is changed.
Declaration
public event PropertyChangedCallback TabItemContextMenuItemTemplateChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
UseCustomEditableTemplateChanged
Event that is raised when UseCustomEditableTemplate property is changed.
Declaration
public event PropertyChangedCallback UseCustomEditableTemplateChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |