How can I create a binding to a property defined in an UserControl from XAML which includes it? For example, I have a control of type local:Photo named thePhoto, which has three controls local:Layer called Main, Frame and Text, and I want to access thePhoto.Main.ActualWidth from my MainWindow? Thanks
(I forgot to say that simple Binding with Path and ElementName doesn’t work)
Create
DependencyPropertyof desired type within “parent”UserControland bind it with needed Properties on both sides.Nice example of doing stuff like that:
Exploring the use of Dependency Properties in User Controls