ā Can't get root XAML element of UserControl for binding
I have a user control that declares a property that I need to bind properties of its children to. I was trying
"{Binding Property, ElementName=window}"
for my binding expression. But that seems to fail. It seems user controls don't have a window element. I tried {Binding Property, RelativeSource={RelativeSource AncestorType=UserControl, AncestorLevel=20}}
as well, but that doesn't work either. I don't know why. Can someone help? Technically, UserControl
isn't my immediate base class. So I tried the intermediate base class as well, but that didn't work. I also tried the derived class to no avail.4 Replies
give it a name and bind
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.Haven't had time to get back to this.
š¦
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.