XAML Shapes render without anti-alias

Nov 19, 2009 at 9:11 AM

Hi all,

I don't know if this is a WPF problem or something related to Gmaps.NET but i have not found a solution to this problem yet so i tought maybe somebody can help me with this.

I am using the WPF Version of the control (Via ElementHost in an Windows Forms Application). I have created a marker shape that includes an image and a XAML shape (a PATH).
In the XAML designer in Visual Studio the shape looks great! but when i run the app it seems like anti-alias is not beeing used.

This allso happens for simple shapes like Ellipse found in the designer's toolbox.

Below are to screenshots to illustrate my problem

Runtime: http://img685.imageshack.us/img685/6166/runtime.png

Designer: http://img22.imageshack.us/img22/772/designery.png

Did anyone of you had this problem before?

Thanks in advance,


Nov 19, 2009 at 11:23 AM

can you test it with empty canvas with that one marker, is it still alias?

Nov 19, 2009 at 11:53 AM
Edited Nov 19, 2009 at 11:55 AM

I tested with this stripped down xaml is this what you mean?

<UserControl x:Class="RelationPointer"



    <Path  Width="330" Height="250" Name="Balloon" Data="F1 M 119.04,141.44 L 119.04,78.88 319.36,78.88 319.36,245.76 119.04,245.76 119.04,183.2 54.88,188.96 119.04,141.44 z"
Stroke="Black" StrokeThickness="2" Margin="-50,-110,60,2" Fill="White"></Path>


Inside a <Canvas> the <Path> is still alias.

Nov 19, 2009 at 12:34 PM

canvas.childern.Add(new RelationPointe()); // is it alias or not?

Nov 19, 2009 at 1:04 PM

When i add another ElementHost on my Form and select my custom shape as Hosted content it renders correctly!

so only when the shape is used inside gmaps it will loose its anti-alias:


Nov 23, 2009 at 1:29 PM

Hi Piet, Radioman,

Is this the same as the circle in the WPF demo?

When you set pxCircleRadius = 20; in method UpdateCircle you get not a nice circle as in the Circle.xaml.

I want to create very very small ellipses (a bit thicker than a dot), and I also have not so round circles.


Mar 17, 2010 at 2:40 AM

Hi radioman,

Thanks for this great control, but I was also wondering about the lack of anti-aliasing for markers etc. How can I fix this?

Mar 17, 2010 at 7:15 AM

MainMap.SetValue(RenderOptions.EdgeModeProperty, EdgeMode.Unspecified); // but this makes some spaces between tiles