Jul
29
2009

TopMost Window In XAML



Comments available as RSS 2.0

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!


Comments

Leave a Comment

Login using OpenID or enter your details below to leave a comment.

OpenID
Anonymous


Comment