Non-resizeable, bordered WPF Windows with WindowStyle=None
        Posted  
        
            by danielmartinoli
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by danielmartinoli
        
        
        
        Published on 2010-05-31T11:40:53Z
        Indexed on 
            2010/05/31
            11:42 UTC
        
        
        Read the original article
        Hit count: 1190
        
Basically, I need a window to look like the following image: http://screenshots.thex9.net/2010-05-31_2132.png
(Is NOT resizeable, yet retains the glass border)
I've managed to get it working with Windows Forms, but I need to be using WPF. To get it working in Windows Forms, I used the following code:
    protected override void WndProc(ref Message m)
    {
        if (m.Msg == 0x84 /* WM_NCHITTEST */)
        {
            m.Result = (IntPtr)1;
            return;
        }
        base.WndProc(ref m);
    }
This does exactly what I want it to, but I can't find a WPF-equivalent. The closest I've managed to get with WPF caused the Window to ignore any mouse input.
Any help would be hugely appreciated :)
© Stack Overflow or respective owner