resolution-independence

Is it bad to work with pixels in CSS? [closed]

穿精又带淫゛_ 提交于 2019-11-28 16:46:55
Is it bad in terms of compatibility to use pixel numbers in CSS instead of percentages? How about lower resolutions? Is it okay to work with them in ranges of 1-100? This is a difficult question, because the answer mostly depends on your situation. Pixels are not that bad, I mostly use them too. (Sometimes even for font sizes.) I usually fix the outer block element of the layout by a given size (pixels with fixed-width layouts, and percentages with fluid layouts), and on the inside elements I usually set percentages whenever possible. There are some elements which simply can't be styled with

tips on developing resolution independent application

末鹿安然 提交于 2019-11-27 17:53:46
Is it a good practice to find the workarea measurement and set some properties in code so that it could be bound to Control's margin or height/Width properties in xaml? I do this so that my window would resize according to the available workarea. const int w = SystemParameters.WorkArea.Width; const int h = SystemParameters.WorkArea.Height; public Thickness OuterGridMargin { get; } MainViewModel() { OuterGridMargin = new Thickness(w/5,h/6,w/5,h/4); } xaml: <Grid Margin="{Binding OuterGridMargin}" /> I do this for some outer containers so that the layout would not be messed in lower resolutions.

Is it bad to work with pixels in CSS? [closed]

二次信任 提交于 2019-11-27 09:55:15
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Is it bad in terms of compatibility to use pixel numbers in CSS instead of percentages? How about lower resolutions? Is it okay to

tips on developing resolution independent application

为君一笑 提交于 2019-11-26 19:16:22
问题 Is it a good practice to find the workarea measurement and set some properties in code so that it could be bound to Control's margin or height/Width properties in xaml? I do this so that my window would resize according to the available workarea. const int w = SystemParameters.WorkArea.Width; const int h = SystemParameters.WorkArea.Height; public Thickness OuterGridMargin { get; } MainViewModel() { OuterGridMargin = new Thickness(w/5,h/6,w/5,h/4); } xaml: <Grid Margin="{Binding