Set property on usercontrol that can be used in custom panel in control... Silverlight

Posted by Dimestore Cowboy on Stack Overflow See other posts from Stack Overflow or by Dimestore Cowboy
Published on 2010-06-08T16:30:27Z Indexed on 2010/06/08 16:32 UTC
Read the original article Hit count: 302

I have a simple usercontrol that uses a simple custom panel where I just overrode the Orientation and Measure functions.

What I want to do is to have a property in the usercontol to control the orientation

So I basicaly have UserControl --> Listbox --> MyPanel

And I want a property for the usercontrol that can be set in xaml (of type System.Windows.Controls.Orientation ) that I can bind to from my custom panel (or a different approach if binding isnt the right way to do it)

It would be a bonus if that property could show up in the properties window and you could select vertical or horizontal.

And a super bonus if I could change the property at design time and have the listbox/

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about usercontrols