Created
April 7, 2011 03:55
-
-
Save donatj/907008 to your computer and use it in GitHub Desktop.
JumpList Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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