/// <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> /// 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 JumpListTask[] tasks) { if (userTasks == null) { // Make sure that we don't create multiple instances // of this object lock (syncLock) { if (userTasks == null) { userTasks = new JumpListItemCollection <JumpListTask>(); } } } if (tasks != null) { foreach (JumpListTask task in tasks) { userTasks.Add(task); } } }