Esempio n. 1
0
        void PreviousTab()
        {
            if (VisualSelectedIndex() > 0)
            {
                var Indecies = ImageTabControl.GetOrderedHeaders().ToList();

                if (Indecies[VisualSelectedIndex() - 1].Content is TabItemControl nextTabItem)
                {
                    ImageTabControl.SelectedIndex = ImageTabControl.Items.IndexOf(nextTabItem);
                }
            }
        }
Esempio n. 2
0
        void NextTab()
        {
            if (VisualSelectedIndex() == tabControlManager.CurrentTabControl.Items.Count - 1)
            {
                return;
            }

            var Indecies = ImageTabControl.GetOrderedHeaders().ToList();

            if (Indecies[VisualSelectedIndex() + 1].Content is TabItemControl nextTabItem)
            {
                ImageTabControl.SelectedIndex = ImageTabControl.Items.IndexOf(nextTabItem);
            }
        }
Esempio n. 3
0
        int VisualIndex(TabItemControl obj)
        {
            var OrderedHeaders = ImageTabControl.GetOrderedHeaders().ToList();
            var Index          = 0;

            foreach (var header in OrderedHeaders)
            {
                if (header.Content is TabItemControl tabItem && Equals(obj, tabItem))
                {
                    return(Index);
                }

                Index++;
            }

            return(-1);
        }