Current Position Databinding

Topics: Feature Requests, WPF
Mar 9, 2013 at 11:15 PM
Hi Radioman,

is it possible to change the current position so that it can handle databinding. Ive tried to put in a dependency property in the custom map file but it break the map :)
 public PointLatLng CurrentPosition
                return (PointLatLng)GetValue(CurrentPositionProperty);
                SetValue(CurrentPositionProperty, value);

        public static readonly DependencyProperty CurrentPositionProperty =
            DependencyProperty.Register("CurrentPosition", typeof(PointLatLng), typeof(Map), new UIPropertyMetadata(null, CurrentPositionChangedCallBack));

        static void CurrentPositionChangedCallBack(DependencyObject d, DependencyPropertyChangedEventArgs e)
            Map cp = (Map)d;
            cp.CurrentPosition = (PointLatLng)e.NewValue;
Mar 10, 2013 at 7:09 AM
'break' ?
Mar 10, 2013 at 11:27 AM
The error I get is "Cannot create an instance of 'Map'"
'The invocation of the constructor on type 'WpfGmap2012.MapControls.Map' that matches the specified binding constraints threw an exception.' Line number '66' and line position '38'.