Bind to DependencyProperty of Window
I want to create a CheckBox for toggling the Topmost property of the window. If TopMost was a property of the ViewModel, I’d use this: <CheckBox IsChecked="{Binding Path=Topmost}">Topmost</CheckBox> But Topmost is a DependencyProperty on the Window in which the CheckBox is situated. I tried the following: <CheckBox IsChecked="{Binding Path=Topmost, Source={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}">Topmost</CheckBox> but I… Read More Bind to DependencyProperty of Window