/// <summary> /// Creates a new custom category instance /// </summary> /// <param name="categoryName">Category name</param> public JumpListCustomCategory(string categoryName) { Name = categoryName; JumpListItems = new JumpListItemCollection<IJumpListItem>(); JumpListItems.CollectionChanged += OnJumpListCollectionChanged; }
/// <summary> /// Creates a new custom category instance /// </summary> /// <param name="categoryName">Category name</param> /// <param name="maxItems">The maximum number of items the custom category should hold</param> public JumpListCustomCategory(string categoryName, int maxItems) { Name = categoryName; JumpListItems = new JumpListItemCollection<IJumpListItem>(); MaxItems = maxItems; }
/// <summary> /// Adds user tasks to the Taskbar JumpList. User tasks can only consist of JumpListTask or /// JumpListSeparator objects. /// </summary> /// <param name="tasks">The user tasks to add to the JumpList.</param> public void AddUserTasks(params IJumpListTask[] tasks) { if (userTasks == null) { // Make sure that we don't create multiple instances // of this object lock (syncLock) { if (userTasks == null) { userTasks = new JumpListItemCollection<IJumpListTask>(); } } } foreach (IJumpListTask task in tasks) userTasks.Add(task); }
/// <summary> /// Creates a new custom category instance /// </summary> /// <param name="categoryName">Category name</param> public JumpListCustomCategory(string categoryName) { Name = categoryName; JumpListItems = new JumpListItemCollection<IJumpListItem>(); }