WP8 Bind to Parent Page's Field
I have a WP8 application I'm working on, and I'm having a databinding
problem. I am trying to bind a ListBox's ItemsSource property to the
Albums field of its parent page. In regular WPF, I would use this (ugly)
binding:
{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type
Page}}, Path=Albums}
But that apparently doesn't work in Windows Phone, and it's pretty ugly,
anyway. How can I do this?
No comments:
Post a Comment