I had a control in my main app, and now I want to house it inside a user control. Inside of the main app, I had a listbox that had an ItemsSource property items that were bound to a control with code like the following:
Now that it is in the user control, the "MyMap" element is in the main app and not the user control, so the binding doesn't work. How do I modify this expression to have it refer to the same element, but in the main parent app? Can I do it in XAML, or do I do this behind the scenes? If behind the scenes, what code?Code:<ListBox x:Name="lstLayers" ItemsSource="{Binding ElementName=MyMap, Path=Layers.[MyMapService].Layers}" ...
*** To clarify, I want to know if there is a way to do this based on a parent/child relationship. I can get the control to work through other means.


Reply With Quote