Beispiel #1
0
        /// <summary>
        /// Called to inform the tab control that one of its items was clicked.
        /// </summary>
        /// <param name="container">The item container that was clicked.</param>
        internal void HandleItemClicked(TabItem container)
        {
            BeginChangeSelection();

            UnselectAllItems();
            SelectContainer(container);

            EndChangeSelection();
        }
Beispiel #2
0
        /// <summary>
        /// Called to inform the tab control that one of its items changed its content.
        /// </summary>
        /// <param name="container">The item that was changed.</param>
        internal void HandleItemContentChanged(TabItem container)
        {
            if (SelectedIndex < 0 || SelectedIndex >= Items.Count)
                return;

            var current = ItemContainerGenerator.ContainerFromIndex(SelectedIndex);
            if (current != container)
                return;

            UpdateTabContent();
        }