Reputation: 179
Is it a good idea to set Window's padding using a border in WPF? Or maybe there are any other ways to set Window's padding without setting margins of every control?
Upvotes: 1
Views: 1697
Reputation: 3236
Not sure if you are looking for design feedback or implementation, but I'll give it a go...
Regarding design: Usually there isn't padding directly within a window's frame. Take a look at your browser and notice that the content goes all the way to the edge of the frame. However, within the content there's lots of places where there's padding\margin (though some that don't have it). For general sizing\padding practices take a look at the Windows style guidelines.
Regarding implementation: To save your fingers from overtyping the same properties all over the place take a look at Styles (specifically implicit styles). This allows you to pre-set all buttons with a give padding and other properties like background, font, min width\height (very handy), and stuff like that.
Upvotes: 2