❔ 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.