Each button with the following style has pixelation on the desired site. You can see this clearly in the selected (blue) line:

This is the part of my code that is causing the problem (something screwed up the formatting to fix it a bit, sorry!):
<Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border> <Border.Background> <VisualBrush> <VisualBrush.Visual> <Grid Width="80" Height="20"> <Grid.RowDefinitions> <RowDefinition Height="2*"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Rectangle Grid.RowSpan="2" RadiusX="13" RadiusY="13"> <Rectangle.Fill> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Color="LightGray" Offset="0"/> <GradientStop Color="Gray" Offset="1"/> </LinearGradientBrush> </Rectangle.Fill> </Rectangle> <Rectangle Margin="3,2" RadiusX="8" RadiusY="12"> <Rectangle.Fill> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Color="#dfff" Offset="0"/> <GradientStop Color="#0fff" Offset="1"/> </LinearGradientBrush> </Rectangle.Fill> </Rectangle> </Grid> </VisualBrush.Visual> </VisualBrush> </Border.Background> <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> </Border> </ControlTemplate> </Setter.Value> </Setter>
Does anyone have an idea why the buttons are pixelated on the right site?
source share