Just an example. The CustomControl has a ViewModel with a property called "Test"
How could I bind the textbox to that specific property? Can you access the siblings ViewModel?
<TextBox Text="{Binding ElementName=myControl, Path=ViewModel.Test}"></TextBox>
<Controls:CustomControl x:Name="myControl" />
Siblings ViewModel would be in its DataContext try
<TextBox Text="{Binding ElementName=myControl, Path=DataContext.Test}"></TextBox>
<Controls:CustomControl x:Name="myControl" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With