I want to show a chromeless modal window with a close button in the upper right corner. Is this possible?
+7
A:
You'll pretty much have to roll your own Close button, but you can hide the window chrome completely using the WindowStyle attribute, like this:
<Window WindowStyle="None">
That will still have a resize border. If you want to make the window non-resizable then add ResizeMode="NoResize" to the declaration.
Matt Hamilton
2008-09-01 12:34:31
A:
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300" WindowStyle="None" ResizeMode="NoResize">
<Button HorizontalAlignment="Right" Name="button1" VerticalAlignment="Top" >Close</Button>
</Window>
aku
2008-09-01 12:53:20
Great article :D
nyxtom
2009-11-25 23:19:08
+8
A:
The WPF SDK Team posted a EXCELLENT article about chromeless windows available here: http://blogs.msdn.com/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx
This is a MUST read!!!
UPDATED
Also found this article by Lester Lebo on how to use the WPF Shell Integration Library for a custom window chrome
rudigrobler
2008-09-09 06:33:22