コード例 #1
0
ファイル: FabTabControl.cs プロジェクト: itinerant-fox/FabTab
 private void UpdateContentsTabViewsIfNecessary()
 {
     if (ShowContentsTab && _contentsTabAdded && this.Items.Count > 1)
     {
         ContentTabView view = this.Items[0] as ContentTabView;
         if (view != null)
         {
             view.SetViews(BuildDictionaryOfViewsAndHeaders());
         }
     }
 }
コード例 #2
0
ファイル: FabTabControl.cs プロジェクト: itinerant-fox/FabTab
 protected override bool IsItemItsOwnContainerOverride(object item)
 {
     if (_itemsStrategy == null)
     {
         SetupItemsStrategy();
     }
     //need the second check only for .NET 4.0 because this method gets called way more often for some reason.
     if (item is ContentTabView && !(this.ItemContainerGenerator.Status == GeneratorStatus.ContainersGenerated))
     {
         _contentTabView = item as ContentTabView;
     }
     return(item is FabTabItem);
 }
コード例 #3
0
ファイル: FabTabControl.cs プロジェクト: itinerant-fox/FabTab
        protected override DependencyObject GetContainerForItemOverride()
        {
            //Added some extra _contentTabview stuff in this method in the if conditional
            //as well as nulling it out outside of the if conditional.  Also had to
            //null out _contentTabView in OnSelectionChanged.  All these changes were necessary
            //because of some differing behavior in .NET 4.0 beta for when IsItemsItsOwnContainer
            //gets called which caused me state issues with_contentTabView.
            if (_itemsStrategy == null)
            {
                SetupItemsStrategy();
            }

            if (_contentTabView != null)
            {
                ContentTabItem tabItem = CreateContentTabItem();
                _contentTabView = null;
                return(tabItem);
            }

            return(CreateNewFabTabItemAndWireUpClosingEvent());
        }
コード例 #4
0
ファイル: FabTabControl.cs プロジェクト: tablesmit/FabTab
 protected override bool IsItemItsOwnContainerOverride(object item)
 {
     if (_itemsStrategy == null)
     {
         SetupItemsStrategy();
     }
     //need the second check only for .NET 4.0 because this method gets called way more often for some reason.
     if (item is ContentTabView && !(this.ItemContainerGenerator.Status == GeneratorStatus.ContainersGenerated))
     {
         _contentTabView = item as ContentTabView;
     }
     return (item is FabTabItem);
 }
コード例 #5
0
ファイル: FabTabControl.cs プロジェクト: tablesmit/FabTab
        protected override DependencyObject GetContainerForItemOverride()
        {
            //Added some extra _contentTabview stuff in this method in the if conditional
            //as well as nulling it out outside of the if conditional.  Also had to
            //null out _contentTabView in OnSelectionChanged.  All these changes were necessary
            //because of some differing behavior in .NET 4.0 beta for when IsItemsItsOwnContainer
            //gets called which caused me state issues with_contentTabView.
            if (_itemsStrategy == null)
            {
                SetupItemsStrategy();
            }

            if (_contentTabView != null)
            {
                ContentTabItem tabItem = CreateContentTabItem();
                _contentTabView = null;
                return tabItem;
            }

            return CreateNewFabTabItemAndWireUpClosingEvent();
        }
コード例 #6
0
ファイル: FabTabControl.cs プロジェクト: tablesmit/FabTab
 internal object GetContentsTab()
 {
     ContentTabView contentTabView = new ContentTabView(this);
     return contentTabView;
 }
コード例 #7
0
ファイル: FabTabControl.cs プロジェクト: itinerant-fox/FabTab
        internal object GetContentsTab()
        {
            ContentTabView contentTabView = new ContentTabView(this);

            return(contentTabView);
        }