> > >
Zune Borderless Window Behavior
Express yourself! Share your work with other members of the Expression Community.

Each contribution is licensed to you under a License Agreement by its owner, not Microsoft. Microsoft does not guarantee the contribution or purport to grant rights to it.

Zune Borderless Window Behavior

Average Rating:  (8)
Description
Discussions (4)

  • Min width & Height not working...
    1 Posts | Last Post November 25, 2011
    • Hi Jeremy, 
      
      Great work with this behavior, really smart!
      Only thing is that you can resize it past its "limits". 
      
      Any clue on how to stop this happening and not allowing the window to resize under its minimum size?
      
      Thanks!!
      Jose
  • Minimum Height/Width Handled
    1 Posts | Last Post September 22, 2011
    • Here is another fix to allow the application to handle its own minimum height/width.  I haven't noticed any problems using this along with the other fixes mentioned below.
      
      case WM_GETMINMAXINFO:
      WmGetMinMaxInfo(hWnd, lParam);
      handled = false; // Used false to let application handle min height requirements
      break;
  • Problem with child windows
    4 Posts | Last Post August 29, 2011
    • There is just one "slight" problem with this behavior:
      
      Any child window you create in the code of this Zune-looking window will be unresponsive to user input and mouse clicks, which makes this approach useless. 
      
      If you can fix this problem, please let me know.
      
      P.S. To reproduce the problem, open the demo solution, add and button on main window and call MessageBox.Show in click handler for the button. You will know what I mean. 
      
      Max.
    • UPDATE:
      
      The problem is in HwndHook method of ZuneWindow.cs.
      
      In my scenario, whenever I needed to display a child dialog, my Zune-looking window was already hidden, so I just commented out handeled = true in WM_NCACTIVATE message procession case, and by doing this got a responsive dialog, however this is one in the million shot that you will have the similar situation. If you comment out handeled = true, you will have a very non-Zune looking window.
      
      Some hWnd filtering should probably introduced in the code, so that the HwndHook only affects the messages, sent by the main window' message loop.
      
      Max. 
    • I am having the same experience with child windows. Has anyone solved this issue and if so, do you mind updating the source or sharing with others.
      
      Thanks
      Callon
    • Solution:
      IntPtr returnval = IntPtr.Zero;
      ...
      returnval = DefWindowProc(hWnd, message, wParam, new IntPtr(-1));
      ...
      return returnval;
      
      So return the DefWindowProc's return value in the HwndHook method.
      
      I found it here:
      http://metrotoolkit.codeplex.com/
  • Great look and performance!
    1 Posts | Last Post October 20, 2010
    • Love this window! Only thing I have noticed which is not perfect, is that the border shows when the window is inactive. Do you know why? I cant seem to figure it out...
      
      Best Regards,
      Ola

Details

Rate it:
 
 
 
 
 
  • Share It:
    E-mail Twitter del.icio.us Digg Facebook
  • Add To Favorites
  • Published: 10/18/2010
  • Tags: Behavior, WPF, Zune
  • License Information:
    This contribution is licensed to you under Creative Commons by its owner, not Microsoft. Microsoft does not guarantee the contribution or purport to grant rights to it.