yannis
yannis

Reputation: 67

TrySetDisableLayoutScaling not working

For a specific device app , I have to build Xaml Pages with some png . So I need to disable scaling . trySetDisableLayoutScaling is supposed to do the job since 10.0.14393.0

But it returns false and nothing change.

Help me :)

Upvotes: 0

Views: 328

Answers (2)

yannis
yannis

Reputation: 67

Using ViewBox on every Page solved my problem

Upvotes: 0

Sunteen Wu
Sunteen Wu

Reputation: 10627

To preserve the physical size of UI, Windows automatically scales UI elements. You might not want this behavior, for how to counteract the automatic scaling of text and UI elements, you can reference this official sample to reset your UIElement to what you want manually.

For TrySetDisableLayoutScaling, as it is for 'trying', it may be fail. This method seems like to prefer used in XBOX application.

Upvotes: 1

Related Questions