/// <summary>
        /// Get the value of SelectedIndex.
        /// </summary>
        /// <param name="item">The model item for a TabControl.</param>
        /// <returns>SelectedIndex of the TabControl.</returns>
        public static int GetDesignTimeSelectedIndex(ModelItem item)
        {
            int selectedIndex = item.GetDesignerProperty(DesignTimeSelectedIndexProperty);

            // check if that tab is really active. If not, then return -1 (none of the tabs are active
            if (item.Content != null &&
                item.Content.Collection.Count > 0 &&
                selectedIndex < item.Content.Collection.Count)
            {
                if (TabItemDesignModeValueProvider.GetDesignTimeIsSelected(item.Content.Collection[selectedIndex]))
                {
                    return selectedIndex;
                }
            }
            return -1;
        }
        /// <summary>
        /// Get the value of SelectedIndex.
        /// </summary>
        /// <param name="item">The model item for a TabControl.</param>
        /// <returns>SelectedIndex of the TabControl.</returns>
        public static int GetDesignTimeSelectedIndex(ModelItem item)
        {
            int selectedIndex = item.GetDesignerProperty(DesignTimeSelectedIndexProperty);

            // check if that tab is really active. If not, then return -1 (none of the tabs are active
            if (item.Content != null &&
                item.Content.Collection.Count > 0 &&
                selectedIndex < item.Content.Collection.Count)
            {
                if (TabItemDesignModeValueProvider.GetDesignTimeIsSelected(item.Content.Collection[selectedIndex]))
                {
                    return(selectedIndex);
                }
            }
            return(-1);
        }
 /// <summary>
 /// Get the value of IsSelected.
 /// </summary>
 /// <param name="item">The ModelItem representing a TabItem.</param>
 /// <returns>The design time value for IsSelected property.</returns>
 public static bool GetDesignTimeIsSelected(ModelItem item)
 {
     return item.GetDesignerProperty(DesignTimeIsSelectedProperty);
 }
 /// <summary>
 /// Get the value of IsSelected.
 /// </summary>
 /// <param name="item">The ModelItem representing a TabItem.</param>
 /// <returns>The design time value for IsSelected property.</returns>
 public static bool GetDesignTimeIsSelected(ModelItem item)
 {
     return(item.GetDesignerProperty(DesignTimeIsSelectedProperty));
 }
 /// <summary>
 /// Get the value of CurrentSelectedIndex. 
 /// </summary>
 /// <param name="item">The model item for a TabControl.</param>
 /// <returns>CurrentSelectedIndex of the TabControl.</returns>
 public static int GetCurrentSelectedIndexPropertyValue(ModelItem item)
 {
     return item.GetDesignerProperty(CurrentSelectedIndexValueProperty);
 }
 /// <summary>
 /// Get the value of CurrentSelectedIndex.
 /// </summary>
 /// <param name="item">The model item for a TabControl.</param>
 /// <returns>CurrentSelectedIndex of the TabControl.</returns>
 public static int GetCurrentSelectedIndexPropertyValue(ModelItem item)
 {
     return(item.GetDesignerProperty(CurrentSelectedIndexValueProperty));
 }