WPF: how to display enum property values in VS2008 XAML editor intellisense?

老子叫甜甜 提交于 2019-12-03 21:35:57

问题


I created a WPF custom control with a dependency property of an enum type.

I want the user of that control when editing the XAML in VS to see the optional values of the enum in the intellisense window.

Does anyone know how it can be done?


回答1:


I believe it will work if you add an "XmlnsDefinition" attribute to the assembly containing the control. By the way, I ran into problems with this when trying to reference the control in the same project.




回答2:


The question was asked also here:

How can I get IntelliSense to auto-complete an enum on a custom/user control in XAML?

There is an answer but it's not marked, maybe you can try the suggestion and come back with the result of your test.



来源:https://stackoverflow.com/questions/419802/wpf-how-to-display-enum-property-values-in-vs2008-xaml-editor-intellisense

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