Intellisense for Attached Property values?
-
A lot of the articles on attached properties use DockPanel.Dock as an example, yet DockPanel.Dock does something that I haven't seen explained in all my searching so far: In the XAML editor, there is an intellisense dropdown that displays the four possible options (Top, Left, etc). I've been searching high and low but I can't figure out how to set up my property to display a set of options like that in intellisense. Obviously it's not absolutely required for my current project, but I'd really like to know how to get those to show up. Do I need some kind of converter, and if so how do I link that to the property?
-
A lot of the articles on attached properties use DockPanel.Dock as an example, yet DockPanel.Dock does something that I haven't seen explained in all my searching so far: In the XAML editor, there is an intellisense dropdown that displays the four possible options (Top, Left, etc). I've been searching high and low but I can't figure out how to set up my property to display a set of options like that in intellisense. Obviously it's not absolutely required for my current project, but I'd really like to know how to get those to show up. Do I need some kind of converter, and if so how do I link that to the property?
My guess is that it's because the property is of an enum type.
-
My guess is that it's because the property is of an enum type.
I tried creating an enum type for an attached property, but the enum names didn't show up in the xaml editor, and entering them manually results in an error message saying 'Cannot convert "foo" to string'. Maybe I will try using Reflector to figure it out.
-
I tried creating an enum type for an attached property, but the enum names didn't show up in the xaml editor, and entering them manually results in an error message saying 'Cannot convert "foo" to string'. Maybe I will try using Reflector to figure it out.
quetzilla wrote:
I will try using Reflector to figure it out
I imagine there is some sort of attribute decorating the property. That is what is typically done when there needs to be options for the designer.
-
quetzilla wrote:
I will try using Reflector to figure it out
I imagine there is some sort of attribute decorating the property. That is what is typically done when there needs to be options for the designer.