WPF buttons same/recommended width
        Posted  
        
            by rwallace
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by rwallace
        
        
        
        Published on 2010-04-17T13:36:39Z
        Indexed on 
            2010/04/17
            13:43 UTC
        
        
        Read the original article
        Hit count: 322
        
Suppose you have a window with multiple buttons such as Ok/Cancel or Yes/No/Cancel. All the buttons need to be the same width. Obviously this could be done by just guessing a number and hardwiring all of them to that number.
Is there a better way to do it, one that would take into account preferred/recommended sizes (just how wide should an Ok button be anyway? This is not a rhetorical question, I actually don't know the answer!), what's needed by the text of the longest caption, what happens if the font size is increased etc?
© Stack Overflow or respective owner