JumpList Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides functionality for an app's jump list. A jump list is a system-provided menu that appears when the user right-clicks a program in the taskbar or on the Start menu. It is used to provide quick access to recently or frequently-used documents and offer direct links to app functionality. Not all device families support jump lists.
public ref class JumpList sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class JumpList final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class JumpList
Public NotInheritable Class JumpList
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10586.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v2.0)
|
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. Make sure your app has registered to become the default file handler for a certain file type that you want to show in the recent items list. For more information, see Handle file activation.
Properties
Items |
Gets the list of JumpListItem's for the jump list. Items is of type IVector(JumpListItem). |
SystemGroupKind |
Gets or sets the current type of the system managed jump list group. |
Methods
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. |
LoadCurrentAsync() |
Asynchronously retrieves the current jump list and its items. |
SaveAsync() |
Asynchronously saves changes to the jump list and its items. |