JumpList.SetJumpList(Application, JumpList) Method
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.
Sets the JumpList object associated with an application.
public:
static void SetJumpList(System::Windows::Application ^ application, System::Windows::Shell::JumpList ^ value);
public static void SetJumpList (System.Windows.Application application, System.Windows.Shell.JumpList value);
static member SetJumpList : System.Windows.Application * System.Windows.Shell.JumpList -> unit
Public Shared Sub SetJumpList (application As Application, value As JumpList)
Parameters
- application
- Application
The application associated with the JumpList.
Examples
The following example shows how to create a JumpList in code. The static SetJumpList method is called to associate the JumpList with the current application. The JumpList is automatically applied to the Windows shell when it is set. This example is part of a larger example available in the JumpList class overview.
private void SetNewJumpList(object sender, RoutedEventArgs e)
{
//Configure a new JumpTask
JumpTask jumpTask1 = new JumpTask();
// Get the path to WordPad and set the JumpTask properties.
jumpTask1.ApplicationPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "write.exe");
jumpTask1.IconResourcePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "write.exe");
jumpTask1.Title = "WordPad";
jumpTask1.Description = "Open WordPad.";
jumpTask1.CustomCategory = "Jump List 2";
// Create and set the new JumpList.
JumpList jumpList2 = new JumpList();
jumpList2.JumpItems.Add(jumpTask1);
JumpList.SetJumpList(App.Current, jumpList2);
}
Remarks
You can create multiple JumpList objects. However, only one JumpList at a time can be associated with an Application. Call the SetJumpList method to set the JumpList currently associated with an Application.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기