29 Jul 2009

TopMost Window In XAML

No Comments Programming and WPF

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!

Tags: , ,
written by
The author didn‘t add any Information to his profile yet.
No Responses to “TopMost Window In XAML”

Leave a Reply