MapShape Location Binding

2 posts, 1 answers
  1. Johannes
    Johannes avatar
    66 posts
    Member since:
    Dec 2012

    Posted 10 Apr 2013 Link to this post

    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}" />

    A 'Binding' cannot be set on the 'Location' property of type 'MapRectangle'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.
  2. Answer
    Andrey avatar
    1681 posts

    Posted 11 Apr 2013 Link to this post

    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.

  3. DevCraft banner
Back to Top