言語

JumpList.GetJumpList(Application) メソッド

定義

アプリケーションに関連付けられている JumpList オブジェクトを返します。

public:
 static System::Windows::Shell::JumpList ^ GetJumpList(System::Windows::Application ^ application);
public static System.Windows.Shell.JumpList GetJumpList(System.Windows.Application application);
static member GetJumpList : System.Windows.Application -> System.Windows.Shell.JumpList
Public Shared Function GetJumpList (application As Application) As JumpList

パラメーター

application
Application

JumpListに関連付けられているアプリケーション。

返品

指定したアプリケーションに関連付けられている JumpList オブジェクト。

次の例は、現在のアプリケーションに関連付けられている JumpList を取得する方法を示しています。 JumpTaskJumpItems コレクションに追加され、[最近使ったアイテム] カテゴリに追加されます。 Apply メソッドが呼び出され、更新されたJumpListがWindows シェルに適用されます。 この例は、 JumpList クラスの概要で使用できるより大きな例の一部です。

private void AddTask(object sender, RoutedEventArgs e)
{
    // Configure a new JumpTask.
    JumpTask jumpTask1 = new JumpTask();
    // Get the path to Calculator and set the JumpTask properties.
    jumpTask1.ApplicationPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "calc.exe");
    jumpTask1.IconResourcePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "calc.exe");
    jumpTask1.Title = "Calculator";
    jumpTask1.Description = "Open Calculator.";
    jumpTask1.CustomCategory = "User Added Tasks";
    // Get the JumpList from the application and update it.
    JumpList jumpList1 = JumpList.GetJumpList(App.Current);
    jumpList1.JumpItems.Add(jumpTask1);
    JumpList.AddToRecentCategory(jumpTask1);
    jumpList1.Apply();
}

注釈

GetJumpList メソッドを呼び出して、現在JumpListに関連付けられているApplicationを取得できます。 .NET Framework では、Windows シェルに現在適用されているJumpListである必要はありません。

適用対象