JumpList.GetJumpList(Application) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
JumpList Bir uygulamayla ilişkili nesneyi döndürür.
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
Parametreler
- application
- Application
ile JumpListilişkili uygulama.
Döndürülenler
JumpList Belirtilen uygulamayla ilişkili nesne.
Örnekler
Aşağıdaki örnekte, geçerli uygulamayla ilişkilendirilmiş öğesinin JumpList nasıl alınacakları gösterilmektedir. koleksiyonuna JumpTask JumpItems eklenir ve Son kategorisine eklenir. yöntemiApply, güncelleştirilmiş JumpList Windows kabuğuna uygulamak için çağrılır. Bu örnek, sınıfa genel bakış bölümünde JumpList bulunan daha büyük bir örneğin parçasıdır.
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();
}
Açıklamalar
şu anda ile Applicationilişkilendirilmiş olan öğesini JumpList almak için yöntemini çağırabilirsinizGetJumpList. .NET Framework, şu anda Windows kabuğuna uygulanmış olanın bu olması JumpList gerekmez.