Ejemplo 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);
 }
Ejemplo n.º 2
0
 void IComponentConnector.Connect(int connectionId, object target)
 {
     if (connectionId == 1)
     {
         this.AssetView = (AssetView)target;
     }
     else
     {
         this._contentLoaded = true;
     }
 }
Ejemplo 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);
         }
     }
 }
Ejemplo 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;
        }