I was kind of looking forward to delving into some native call to make a Window always on top in WPF, but it was actually surprisingly easy, a single binding in the Window’s declaration:
<Window ... Topmost="{Binding ElementName=itmTopMost,Path=IsChecked}" ... <MenuItem Header="_Always on Top" x:Name="itmTopMost" IsCheckable="True" /> |
No code involved!
snippets, wpf, xaml