System.Windows.Shell Reference missing

假如想象 提交于 2019-12-04 02:56:17

问题


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!


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/5319235/system-windows-shell-reference-missing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!