I wanted to do a quick user control for my app, but to keep things in a MVVM style I thought I'd set the DataContext of the XAML to the code behind in my UserControl.
i.e.
DataContext="{Binding RelativeSource={RelativeSource Self}}"
This allows me to bind the XAML to properties in my code behind.
Everything went well until I came to bind the Visibility of an instance of the control to a Visibility property on a ViewModel.
<Controls:RoundProgress Visibility="{Binding ProgressVisibility}" Width="100" Height="100"></Controls:RoundProgress>
The Visibility no longer works - if I remove my tinkerings with the DataContext from the User Control - the visibility works!
Can someone set me right please? Thanks