i had problems with pixelated images and found later that RenderOptions.BitmapScalingMode="HighQuality"
solves the problem. Is there a way to set this globally instead of adding the code to each individual image?
Asked
Active
Viewed 299 times
1 Answers
1
Simply set it from a globally applicable style:
<Application x:Class="SO_72015119.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style TargetType="{x:Type Image}" BasedOn="{StaticResource {x:Type Image}}">
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality" />
</Style>
</Application.Resources>
</Application>

Orace
- 7,822
- 30
- 45
-
This just causes an Exception at runtime for me about not being able to find System.Windows.Controls.Image. – Double_A Mar 29 '23 at 11:49
-
@Double_A It's unrelated, maybe try this : https://stackoverflow.com/questions/67298609 – Orace Mar 29 '23 at 12:01