Hi All,
I am working on a WPF application similar to visio. I would like to be able to logically group some of the items in my diagram, each of which is a UIElement, and control certain behaviors (i.e. visibility) at the group level.
My first attempt at this was to create a control, called a Group, which had width & height = 0. I wanted to assign to my diagram elements a specific "Group" through their group property, and then bind certain UIElement properties to the group value, as below:
<DiagramNode
Width="300" Height="300"
Visibility="{Binding RelativeSource={RelativeSource Self},Path=Group.Visibility}"
> ... </DiagramNode >
Although this does not throw a binding error, it also doesn't work. Changing the Visibility of the group has no affect on the visibility of the nodes assigned to that group. No errors appear at anytime as far as i can tell, it just doesn't work.
Any ideas? Is my approach possible? If no, any one have alternatives they'd like to suggest :). I'm not a huge UI guy, feel much more comfortable in a service layer, so I'm open to other suggestions.