System.Windows.Shell Reference missing

2019-02-21 13:09发布

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!

2条回答
家丑人穷心不美
2楼-- · 2019-02-21 13:36

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.

查看更多
放我归山
3楼-- · 2019-02-21 13:51

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.

查看更多
登录 后发表回答