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 ju开发者_如何学运维mp 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:
Do I really still need the Windows API Code Pack to implement a jump list in my Windows Forms application?
Does anyone know of a good Windows Forms relatively simple example tutorial that shows how to implement a jump list?
Am I just overlooking something obvious in not being able to retrieve my System.Windows.Application object?
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.
精彩评论