Skip to content

Clarify UIElement.RasterizationScale semantics and XamlRoot relationship - #130

Draft
John Kennedy (GrantMeStrength) with Copilot wants to merge 2 commits into
docsfrom
copilot/add-ui-element-rasterization-scale-docs
Draft

Clarify UIElement.RasterizationScale semantics and XamlRoot relationship#130
John Kennedy (GrantMeStrength) with Copilot wants to merge 2 commits into
docsfrom
copilot/add-ui-element-rasterization-scale-docs

Conversation

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown

UIElement.RasterizationScale did not explain its intended use, which made it easy to misread as the current display scale. This update clarifies that it is an element-level rendering override and distinguishes it from XamlRoot.RasterizationScale.

  • Documentation clarity

    • Updated the property description to make it explicit that UIElement.RasterizationScale is an extra scale factor you set for rendering an element's content.
    • Removed ambiguity that could imply the property reports monitor or view scale.
  • Behavior and defaults

    • Documented the primary use case: rendering an element at higher resolution than its layout size, such as before scale animation.
    • Explained why the default is 1.0: no extra per-element rasterization scaling is applied unless requested.
  • Relationship to XamlRoot.RasterizationScale

    • Added explicit guidance that XamlRoot.RasterizationScale is the read-only source for the XAML tree's current view-to-physical-pixel scale.
    • Clarified that UIElement.RasterizationScale is an additional per-element multiplier layered on top of that environment scale.

Example of the distinction:

// Read the display scale for the current XAML tree.
double displayScale = myElement.XamlRoot.RasterizationScale;

// Optionally apply extra rasterization scale for a specific element.
myElement.RasterizationScale = 2.0;

Copilot AI changed the title [WIP] Add documentation for UIElement.RasterizationScale property Clarify UIElement.RasterizationScale semantics and XamlRoot relationship Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No information about the purpose of UIElement.RasterizationScale

2 participants