JumpList.GetJumpList(Application) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Devolve o JumpList objeto associado a uma aplicação.
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
Parâmetros
- application
- Application
A aplicação associada ao JumpList.
Devoluções
O JumpList objeto associado à aplicação especificada.
Exemplos
O exemplo seguinte mostra como obter a JumpList aplicação associada à atual. A JumpTask é adicionado à JumpItems coleção e na categoria Recentes . O método Apply é chamado para aplicar o JumpList atualizado à casca Windows. Este exemplo faz parte de um exemplo mais amplo disponível na JumpList visão geral da classe.
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();
}
Observações
Pode chamar o GetJumpList método para obter o JumpList atualmente associado a um Application. O .NET Framework não exige que este seja o JumpList atualmente aplicado à Windows shell.