private bool ShouldCheckCategory(AssetLibrary library, AssetCategory category) { if (AssetView.IsUserThemeCategory(category.Path)) { return(AssetLibrary.GetUserThemeName(library.ActiveUserThemeProvider) == category.Path.LastStep); } return(false); }
void IComponentConnector.Connect(int connectionId, object target) { if (connectionId == 1) { this.AssetView = (AssetView)target; } else { this._contentLoaded = true; } }
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); } } }
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; }