I know how to change text padding for different dpi with @media tag in css file.
I konw how to choose image with MultiDPIBitmapSource
Layout properties like gap, padding... are not styles, not bitmapSource
How can I simply choose layout visual properties like gap and padding based on DPI ?
Those values should be applied in a skin. Use the dpi selector in CSS to choose an appropriate skin for the DPI, or create a skin that implements various custom styles to determine the layout values.