A base class for every MetroTabControl (Pivot).
Inheritance: System.Windows.Controls.TabControl
 public MetroTabItem(BaseMetroTabControl OwningTabControl)
 {
     DefaultStyleKey       = typeof(MetroTabItem);
     this.Unloaded        += MetroTabItem_Unloaded;
     this.Loaded          += MetroTabItem_Loaded;
     this.OwningTabControl = OwningTabControl;
 }
Beispiel #2
0
  public MetroTabItem(BaseMetroTabControl OwningTabControl)
 {
     DefaultStyleKey = typeof(MetroTabItem);
     this.Unloaded += MetroTabItem_Unloaded;
     this.Loaded += MetroTabItem_Loaded;
     this.OwningTabControl = OwningTabControl;
 }
Beispiel #3
0
        private void closeButton_Click(object sender, RoutedEventArgs e)
        {
            ICommand closeTabCommand          = this.CloseTabCommand;
            object   closeTabCommandParameter = this.CloseTabCommandParameter;

            if (closeTabCommandParameter == null)
            {
                closeTabCommandParameter = this;
            }
            object obj = closeTabCommandParameter;

            if (closeTabCommand != null)
            {
                if (closeTabCommand.CanExecute(obj))
                {
                    closeTabCommand.Execute(obj);
                }
                this.CloseTabCommand          = null;
                this.CloseTabCommandParameter = null;
            }
            BaseMetroTabControl baseMetroTabControl = this.TryFindParent <BaseMetroTabControl>();

            if (baseMetroTabControl == null)
            {
                throw new InvalidOperationException();
            }
            object obj1 = baseMetroTabControl.ItemContainerGenerator.ItemFromContainer(this);

            baseMetroTabControl.InternalCloseTabCommand.Execute(new Tuple <object, MetroTabItem>((obj1 == DependencyProperty.UnsetValue ? base.Content : obj1), this));
        }
 internal DefaultCloseTabCommand(BaseMetroTabControl Owner)
 {
     owner = Owner;
 }
Beispiel #5
0
 internal DefaultCloseTabCommand(BaseMetroTabControl Owner)
 {
     owner = Owner;
 }
 private void MetroTabControl_TabItemClosingEvent(object sender, BaseMetroTabControl.TabItemClosingEventArgs e)
 {
     if (e.ClosingTabItem.Header.ToString().StartsWith("sizes"))
         e.Cancel = true;
 }
 internal DefaultCloseTabCommand(BaseMetroTabControl Owner)
 {
     Class6.yDnXvgqzyB5jw();
     base();
     this.owner = Owner;
 }