Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions microsoft.ui.xaml/uielement_rasterizationscale.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,24 @@ public double RasterizationScale { get; set; }

## -description

Gets a value that represents an extra scale factor to be used when rendering shapes, images, text, or media, usually to render at a higher resolution than normal.
Gets or sets an extra scale factor to use when rendering the element's content.

## -property-value

A value that represents the additional scale factor to use while rendering. The default is 1.0.

## -remarks

The value of this property is an extra scale factor to be used when rendering shapes, images, text, or media. It is usually applied to render at a higher resolution than normal.
Use this property when you want a specific element to render its shapes, images, text, or media at a higher resolution than its normal layout size.

For example, it can be used to have a `TextBlock` render at a 2x scale before running a scale animation. This ensures the text is rendered crisply at its final scale value during the animation.
This property does not report the current display scale for the element. Instead, it is a per-element rendering multiplier that you can set in addition to the scale that XAML already applies for the current display.

For example, you can set a `TextBlock` to render at a 2x rasterization scale before running a scale animation. This helps the text stay crisp at its final animated size.

The default value is `1.0`, which means no extra per-element rasterization scaling is applied. In that case, the element renders using only the scale already determined by the XAML environment.

> [!IMPORTANT]
> To determine the display scale factor for an element, use the [XamlRoot.RasterizationScale](xamlroot_rasterizationscale.md) property instead.
> To determine the display scale factor for an element, use the [XamlRoot.RasterizationScale](xamlroot_rasterizationscale.md) property instead. `XamlRoot.RasterizationScale` is a read-only value that describes the current view-to-physical-pixel scale for the XAML tree, while `UIElement.RasterizationScale` is an optional extra scale factor that you set on an individual element.


## -see-also
Expand Down