Esempio n. 1
0
 private bool ShouldCheckCategory(AssetLibrary library, AssetCategory category)
 {
     if (AssetView.IsUserThemeCategory(category.Path))
     {
         return(AssetLibrary.GetUserThemeName(library.ActiveUserThemeProvider) == category.Path.LastStep);
     }
     return(false);
 }
Esempio n. 2
0
 void IComponentConnector.Connect(int connectionId, object target)
 {
     if (connectionId == 1)
     {
         this.AssetView = (AssetView)target;
     }
     else
     {
         this._contentLoaded = true;
     }
 }
Esempio n. 3
0
 public PreserveSelectionToken(AssetView assetView)
 {
     this.Host = assetView;
     if (this.Host.SelectedCategory != null)
     {
         this.SelectedCategory = this.Host.SelectedCategory.Path;
     }
     foreach (AssetCategory assetCategory in (ReadOnlyCollection <AssetCategory>) this.Host.Categories)
     {
         if (assetCategory.IsExpanded)
         {
             this.ExpandedCategories.Add(assetCategory.Path);
         }
     }
 }
Esempio n. 4
0
        private void OpenCategoryContextMenu(AssetCategory category)
        {
            ContextMenu contextMenu = (ContextMenu)null;

            if (AssetView.IsUserThemeCategory(category.Path))
            {
                this.SelectCategory(category);
                contextMenu = UserThemeCommandHelper.GetThemeContextMenu(this.Library, category);
            }
            if (contextMenu == null)
            {
                return;
            }
            contextMenu.Placement = PlacementMode.MousePoint;
            contextMenu.IsOpen    = true;
        }