XTab's Blog

Ged Mead's Blog at vbCity

This blog hosted by:
http://blogs.vbcity.com      
  Home :: Syndication  :: Login

DecJanuary 2009Feb
SMTWTFS
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

Archives

Topics

Ramblings

VB.NET

 For some time now, I've been promising myself that one day I will create a  list of what I like to think of as "WPF MIA" - those basic elements that I am totally familiar with in WindowsForms, but which somehow seem to have disappeared into thin air in WPF.

 In many cases of course the tools are still there; it's just that the name has changed.   Here's an example:

 In Windows Forms, you can hide the Minimize and Maximize buttons by setting the MinimizeBox or MaximizeBox to False  I guess that this is most people's favourite way of doing this. If you dig deeper into the Properties Window though, there is also the  FormBorderStyle property.

  I used to think that this property was only good for things like changing the border style, say, from 3D to single line.  But actually if you choose FixedToolWindow or SizableToolWindow then you automatically get a Form that only has the close button - no Min or Max.

  So what about WPF then? Does it have the same properties available? 

  If you've spent any time on WPF, you'll know that that's really a rhetorical question because you can almost guarantee that things will have changed. Now though you have a WindowStyle property which you can use to set the Window's border style, including showing or hiding the Max and Min buttons.  To have those buttons hidden, you need to choose the ToolWindow option.

  As far as I know, there isn't a property setting that will hide the individual buttons in in WPF.  At first I found this a bit surprising.   However,  as I've become more familiar with WPF and its ability to morph its Windows into almost any conceivable style and shape, I can see that creating your own Window style is so easy that maybe those properties would have been almost redundant anyway.

 

 

posted on Wednesday, October 22, 2008 9:17 AM

Feedback

# re: WPF: How To Hide the Minimize and Maximize Buttons 10/23/2008 7:30 AM knight_lighitning
And what about themes? IMHO, you need to provide styles/templates at least for standard themes (Luna, Royal) which include different color variations at that. I realy like WPF but disability to hide the minimize button (as well as creating a new full-fledged template for such a simple task) seemed like an unfinished job.

# re: WPF: How To Hide the Minimize and Maximize Buttons 11/22/2008 11:58 AM Masoud
thanks

Post Feedback

Title:
Name:
Url:
Comments: 
Protected by Clearscreen.SharpHIPEnter the code you see: