Hi,
I’m trying to create some elements with primitives and I’ve found that when displaying them on an HDPI screen, it doesn’t handle well the calculations. The density for this screen sucks, because 1dp = 1.5px but it’s very common in low end Android cellphones.
I’m using this code:
<StackPanel Margin="0,80">
<Circle Width="20" Height="20" Alignment="Center" Margin="0,30">
<Stroke Width="2" Color="#3F51B5" />
<Circle Width="10" Height="10" Color="#3F51B5" Alignment="Center" />
</Circle>
<Rectangle Height="2" Width="33.3%" Color="#3F51B5" />
</StackPanel>
And is producing this:
As you can see, the circles are not centered and the line, which is supposed to measure a perfect 3px (1.5 x 2) instead it does a strange antialiased height.
Is there something I need to wrap this to make it work? Thanks!