microsoft / xaml-standard

XAML Standard : a set of principles that drive XAML dialect alignment
Other
805 stars 50 forks source link

Add support to Padding #149

Closed rodrigoratan closed 7 years ago

rodrigoratan commented 7 years ago

Margin is the outside 'space' (distance of parent margins) of a control, but padding is the inside space that is taken from the available space that is left to inner controls. true xaml parity should consider padding

insinfo commented 7 years ago

@rodrigoratan Gets or sets a Thickness value that describes the amount of space between a Border and its child element. If I am not mistaken, WPF supports this Including margin also, but not in the same order as CSS

<Button MinWidth="75" Padding="left,top,right,bottom" Content="It speaks!" />

So for 2 left padding, 3 top, 4 right, and 5 bottom:

<Button MinWidth="75" Padding="2,3,4,5" Content="It speaks!" />

Wouldn't it be nice if it had the same order as CSS?

CSS version example:

p {
    padding: 2cm 4cm 3cm 4cm;
}

padding:10px 5px 15px 20px; top padding is 10px right padding is 5px bottom padding is 15px left padding is 20px

Odonno commented 7 years ago

I rather prefer the way WPF/UWP handle Padding.

birbilis commented 7 years ago

Such quadruplets are in other properties too I guess (say margin), so would need to do this everywhere, plus would just confuse people from WPF/Silverlight

dotMorten commented 7 years ago

Wouldn't it be nice if it had the same order as CSS?

Wouldn't it be nice if every single existing XAML app out there didn't break because they suddenly changed the order? This is a breaking change proposal that has no value add, and as such I could not disagree more.

dotMorten commented 7 years ago

This is a duplicate of #11

billhenn commented 7 years ago

XAML has one way of doing it and CSS has another. While it would have been nice if they were originally in sync, at this stage, I'd prefer that XAML stay as is and not break everything in XAML that has been created in the past.

rodrigoratan commented 7 years ago

@dotMorten you're right, I searched for 'padding' and didn't find #11 , thanks for the heads up

insinfo commented 7 years ago

I did not want to say that "WPF Padding" has to be equal to "CSS Padding", more that would be nice if it were. But now I think it's too late for that.