JumpList
JumpList
JumpList
JumpList
Class
Definition
Provides functionality for selecting the type of system-managed jump list that is used by an app, adding custom task entry points to an app's jump list, and adding custom groups to an app's jump list. A jump list consists of an optional system-provided list of items, as well as optional app-provided items. Not all device families support jump lists.
public : sealed class JumpList : IJumpListpublic sealed class JumpList : IJumpListPublic NotInheritable Class JumpList Implements IJumpList// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
Examples
The following example demonstrates how to remove the jump list for an app, including any custom items that might have been previously added.
private async void DisableSystemJumpListAsync()
{
// Get the app's jump list.
var jumpList = await Windows.UI.StartScreen.JumpList.LoadCurrentAsync();
// Disable the system-managed jump list group.
jumpList.SystemGroupKind = Windows.UI.StartScreen.JumpListSystemGroupKind.None;
// Remove any previously added custom jump list items.
jumpList.Items.Clear();
// Save the changes to the app's jump list.
await jumpList.SaveAsync();
}
The following example demonstrates how to set the type of system-managed group used by an app's jump list, without affecting any existing custom jump list items.
private async void SetSystemGroupAsync()
{
// Get the app's jump list.
var jumpList = await Windows.UI.StartScreen.JumpList.LoadCurrentAsync();
// Set the system to autogenerate a Frequent group for the app jump list.
// Alternatively, this property could be set to JumpListSystemGroupKind.Recent to autogenerate a Recent group.
jumpList.SystemGroupKind = Windows.UI.StartScreen.JumpListSystemGroupKind.Frequent;
// No changes were made to the jump list Items property, so any custom tasks and groups remain intact.
await jumpList.SaveAsync();
}
Remarks
An app's JumpList is retrieved using the LoadCurrentAsync method. If an application does not customize its jump list, the system provides a default jump list. Currently, the default jump list shows Recent items.
Properties
Items Items Items Items
Gets the list of JumpListItem 's for the jump list.Items is of type IVector(JumpListItem).
public : IVector<JumpListItem> Items { get; }public IList<JumpListItem> Items { get; }Public ReadOnly Property Items As IList<JumpListItem>// You can use this property in JavaScript.
- Value
- IVector<JumpListItem> IList<JumpListItem> IList<JumpListItem> IList<JumpListItem>
The list of JumpListItem 's for the jump list.
Remarks
Apps may modify the collection by adding items, removing items, or modifying existing items. After the app saves the jump list using SaveAsync, the changes to the collection will be reflected in the jump list shown to the user.
SystemGroupKind SystemGroupKind SystemGroupKind SystemGroupKind
Gets or sets the current type of the system managed jump list group.
public : JumpListSystemGroupKind SystemGroupKind { get; set; }public JumpListSystemGroupKind SystemGroupKind { get; set; }Public ReadWrite Property SystemGroupKind As JumpListSystemGroupKind// You can use this property in JavaScript.
- Value
- JumpListSystemGroupKind JumpListSystemGroupKind JumpListSystemGroupKind JumpListSystemGroupKind
The JumpListItemKind enumeration value of the jump list.
Methods
IsSupported() IsSupported() IsSupported() IsSupported()
Gets a value that indicates whether the system supports jump lists.
Note
Only the desktop device family supports jump lists, changes made to a jump list with a different device family will not persist.
public : static PlatForm::Boolean IsSupported()public static bool IsSupported()Public Static Function IsSupported() As bool// You can use this method in JavaScript.
A boolean value that is True if jump lists are supported. Otherwise, False.
LoadCurrentAsync() LoadCurrentAsync() LoadCurrentAsync() LoadCurrentAsync()
Asynchronously retrieves the current jump list and its items.
public : static IAsyncOperation<JumpList> LoadCurrentAsync()public static IAsyncOperation<JumpList> LoadCurrentAsync()Public Static Function LoadCurrentAsync() As IAsyncOperation( Of JumpList )// You can use this method in JavaScript.
When this method completes successfully, it returns the current JumpList. If the system does not support jump lists, this method returns an empty jump list and the SaveAsync method has no effect. Apps can check for this case using the isSupported method.
SaveAsync() SaveAsync() SaveAsync() SaveAsync()
Asynchronously saves changes to the jump list and its items.
public : IAsyncAction SaveAsync()public IAsyncAction SaveAsync()Public Function SaveAsync() As IAsyncAction// You can use this method in JavaScript.
Returns an IAsyncAction object that is used to control the asynchronous operation. If the system does not support jump lists, the SaveAsync method has no effect and future calls to LoadCurrentAsync will produce an empty jump list. An app can check for this case using the IsSupported method.