Rapid-XAML-Toolkit icon indicating copy to clipboard operation
Rapid-XAML-Toolkit copied to clipboard

Identify Margins/Paddings that don't scale well

Open michael-hawker opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. Reference: https://twitter.com/Niels9001/status/1226235630763626497

This is probably hard without performing actual layout... but it could be useful to highlight scenarios for margins/paddings where they may not scale well. Just a thought, this might be a hard problem.

michael-hawker avatar Feb 08 '20 20:02 michael-hawker

This ties in with some other thoughts I've had about doing more with analyzing styles (other things needed first though.)

Calling out values that aren't multiples of 4 ties in with UWP recommendations. Will need to check for other platforms.

mrlacey avatar Feb 09 '20 18:02 mrlacey

@mrlacey yeah, I'm just thinking of some strange scenario like:

<Grid Margin="2">
  <TextBlock Margin="2"/>

Where it's still '4', but not readily apparent. Though I'm not sure where I'd do it this way, it's just a contrived an example for a potentially more complex scenario. Especially when Styles get thrown in the mix.

michael-hawker avatar Feb 10 '20 00:02 michael-hawker

@michael-hawker I think that there's definitely a case for warning about potential issues with your scenario. At the very least, if everything in the grid had to add a margin there's a benefit in having the grid specify the full margin and everything in it not specify any. (reduced specification in the file leads to quicker passing, a simplified tree, and less potential for issues when the same behavior is also specified elsewhere.)

mrlacey avatar Feb 10 '20 11:02 mrlacey