Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jump Lists and Windows Forms

I've read a few other articles on Stack Overflow about implementing a Windows 7 jump list, but they're all from a couple of years ago and basically suggest, "get the Windows API Code Pack." (Answer 1, Answer 2, ...) I'm trying to implement a jump list in Windows 7, and it looks like there is actually a JumpList class in .NET 4 that implements this functionality, so I am thinking that the previous answers may be obsolete and the Windows API Code Pack is no longer required.

However, the examples given in the documentation depend on XAML, which I'm not familiar with, having only developed Windows Forms apps. Furthermore, the JumpList.SetJumpList method requires a System.Windows.Application object, which for the life of me, I can't figure out how to retrieve from my Windows Forms app (which uses the System.Windows.Forms.Application static object). There is a property System.Windows.Application.Current, but in my Windows Forms app, it returns null.

So my questions are:

  1. Do I really still need the Windows API Code Pack to implement a jump list in my Windows Forms application?

  2. Does anyone know of a good Windows Forms relatively simple example tutorial that shows how to implement a jump list?

  3. Am I just overlooking something obvious in not being able to retrieve my System.Windows.Application object?

like image 487
King Skippus Avatar asked Sep 03 '11 16:09

King Skippus


1 Answers

System.Windows.Application is WPF. Since you are using WinForms you won't have one of these at hand and I suggest you stick to the tried and tested Windows API Code Pack.

like image 141
David Heffernan Avatar answered Oct 14 '22 08:10

David Heffernan