This is a migrated thread and some comments may be shown as answers.

MapShape Location Binding

1 Answer 34 Views
Map
This is a migrated thread and some comments may be shown as answers.
Johannes
Top achievements
Rank 1
Johannes asked on 10 Apr 2013, 11:13 AM
When I use binding to set the Location of a MapShape I always get an Error. What am I doing wrong?

<tel:MapRectangle Location="{Binding Location}" />

Exception:
A 'Binding' cannot be set on the 'Location' property of type 'MapRectangle'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 11 Apr 2013, 10:49 AM
Hello Johannes,

In the case with the MapRectangle and MapEllipse you can use the MapLayer.Location attached property for data binding instead of the Location property.
The sample code is below.
<tel:MapRectangle telerik:MapLayer.Location="{Binding Location}" />

All the best,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Map
Asked by
Johannes
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or