Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Windows.Shell Reference missing

I have a windows form application and i want to make my own custom jumplist. To do this i need to use the namespace System.Windows.Shell but i can't access it, and i can't find a reference for it in the list of references either. I have checked some tutorials but they all use XAML (WPF Application) and some of them just mentions this can be done by coding as well.

So my question is, is it possible to access the namespace needed in a windows form app or do i need to use WPF? And if it is possible then how? And if not, then is there another way to do it in a windows form app?

I'm using Visual Studio 2010 Ultimate (C#).

Thanks in advance!

like image 597
SimplyZ Avatar asked Mar 15 '11 23:03

SimplyZ


2 Answers

The System.Windows.Shell namespace is in the PresentationFramework.dll assembly. You can find that out on your own if you search for the namespace, the containing assembly will be displayed in the details.

like image 166
Femaref Avatar answered Nov 06 '22 22:11

Femaref


An assembly reference to PresentationFramework is required. The namespace is only available in .NET 4. Use Project + Properties, verify the Target Framework setting. Using it in a Winforms app is fine, the classes don't require the WPF plumbing to work. They are wrappers for the Vista API extensions.

like image 40
Hans Passant Avatar answered Nov 06 '22 22:11

Hans Passant