GMapMarker & Binding

Topics: WPF
Sep 21, 2011 at 2:54 PM

Hello, first of all excuse my English, I got help from Google, and before that compliments the excellent work, introduce the provider for the maps was a great idea, especially thinking back to the attitude of Google.
I come to my problem, for a mere exercise (unfortunately my business work is primarily web based) I'm trying to make your control more MVVM friendly.
With GMapControl I had no problems, I created my own inherited control and added various DependencyProperty.
With the Marker instead I just can not find a solution. After several attempts, I came to the conclusion that the GMapMarker must inherit from FrameworkElement.
Initially I tried DependencyObject, the Shape is rendered, but the bindings from XAML does not work. Inherited from FrameworkElement does bind, however, the Shape is not rendered.
I believe that the origin of the problem is the call to VisualTreeHelper.GetParent in the get of Map property that always returns null, which of course does not happen if the class inherits from DependencyObject or Object. I suppose that FrameworkElement changes the VisualTree, I also tried LogicalTreeHelper, but I get the same result.
My current knowledge of WPF does not allow me to figure out exactly how to get around the problem, you can give me some suggestions on this?

thanks in advance

Sep 22, 2011 at 6:22 AM

..thats complicated ;}

Jan 26, 2012 at 3:59 PM

That was resolved in the fork