Gets or sets a value that determines whether rendering for the object and its visual subtree should use rounding behavior that aligns rendering to whole pixels.
Assembly: System.Windows (in System.Windows.dll)
Dependency property identifier field: UseLayoutRoundingProperty
The default of true will cause measurement and layout operations to round potential subpixel values, and render objects aligned to pixel boundaries. This behavior is intended to reduce the visual artifacts that can be perceived when a subpixel value renders and affects pixels on either side of the subpixel boundary. The most prominent example of such an artifact is when you intend to produce a crisp, thin line of a particular color. If your measurement for line gave a subpixel value, and the layout behavior did not round to whole pixels, then the line can potentially appear blurry as well as appearing as a dimmer color shade than you intended.
Setting to false is not generally recommended, and possible scenarios for doing so are not documented here. Ultimately, if you feel that there might be benefit in enabling subpixel rendering for your application, experiment with setting to false, examine the visual results, and make sure that possible rendering artifacts from subpixel rendering do not outweigh the perceived benefits. If you do set to false, always do so on the root of your XAML page or object tree.
In general, you should not specify the default of true explicitly, either in code or XAML. Doing so will interfere with porting your code or XAML to WPF, because UseLayoutRounding is not in the WPF XAML vocabulary or available as a CLR property of UIElement for WPF.