I wanted to make quick user control for my application, but to save things in MVVM style, I thought I installed the DataContext XAML in the code located in my UserControl.
i.e.
DataContext="{Binding RelativeSource={RelativeSource Self}}"
This allows me to bind XAML to properties in my code.
Everything went well until I came to bind the visibility of the control instance to the visibility property in the ViewModel.
<Controls:RoundProgress Visibility="{Binding ProgressVisibility}" Width="100" Height="100"></Controls:RoundProgress>
Visibility no longer works - if I delete my voyages using the DataContext from User Control - visibility works!
Can someone fix me right? Thanks
source
share