Skip to content

Instantly share code, notes, and snippets.

@donatj
Created April 7, 2011 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donatj/907008 to your computer and use it in GitHub Desktop.
Save donatj/907008 to your computer and use it in GitHub Desktop.
JumpList Example
Imports System.Windows.Shell
Class Application
Public Sub New()
Dim jl As New JumpList
JumpList.SetJumpList(Application.Current, jl)
Dim SaveAs As New JumpTask
SaveAs.ApplicationPath = System.Reflection.Assembly.GetExecutingAssembly.Location()
SaveAs.Title = "Save as..."
SaveAs.Arguments = "-saveas"
jl.JumpItems.Add(SaveAs)
Dim Configuration As New JumpTask
Configuration.ApplicationPath = System.Reflection.Assembly.GetExecutingAssembly.Location()
Configuration.Title = "Configuration"
Configuration.CustomCategory = "Settings"
Configuration.Arguments = "-config"
jl.JumpItems.Add(Configuration)
jl.Apply()
End Sub
Private Sub Application_Startup(ByVal sender As Object, ByVal e As System.Windows.StartupEventArgs) Handles Me.Startup
' Handle "Save As" JumpList example
If e.Args.Contains("-saveas") Then
' Fancy Code Funtime
' -- Remember, this launches as a new instance - if you don't want that, this end kills it when your done --
End
End If
' Handle "Configuration" JumpList example
If e.Args.Contains("-config") Then
' I launch a configuration window here, really up to you
' -- Remember, this launches as a new instance - if you don't want that, this end kills it when your done --
End
End If
End Sub
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment