Caption with ShapeData

5 posts, 1 answers
  1. Abder Rezak
    Abder Rezak avatar
    8 posts
    Member since:
    Mar 2012

    Posted 26 Feb 2014 Link to this post

    Hi,

    I have a RadMap with many ellipse (created from EllipseData) and I would like to display text beside the left border of these ellipse.
    I have been able to do something like this with a MapEllipseGeometry (that have a CaptionLocation) in an InformationLayer, but I wonder if it's possible to do this with ShapeData in VisualizationLayer.

    Thank you!

  2. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 27 Feb 2014 Link to this post

    Hi Abder Rezak,

    The map shape data objects like the EllipseData do not support captions. You can use additional VisualizationLayer to display text over the ellipses.

    I have attached a sample solution.

    I hope it helps.

    Regards,
    Andrey Murzov
    Telerik

  3. UI for WPF is Visual Studio 2017 Ready
  4. Abder Rezak
    Abder Rezak avatar
    8 posts
    Member since:
    Mar 2012

    Posted 28 Feb 2014 Link to this post

    Hi Andrey,

    Thanks for the quick reply, I will try your solution.

    Regards
  5. Abder Rezak
    Abder Rezak avatar
    8 posts
    Member since:
    Mar 2012

    Posted 14 Mar 2014 in reply to Abder Rezak Link to this post

    Hi Andrey,

    I tried your solution but I think I have a problem with the bindings, they don't seems to work when I use ElementName.
    I did some changes to your sample that represent what I'm trying to do :

    <DataTemplate x:Key="ItemTemplate">
        <telerik:MapPathView>
            <telerik:MapPathView.Data>
                <telerik:MapEllipseGeometryView Center="{Binding Location}"
                    RadiusX="{Binding ElementName=TheWindow, Path=NiceRadius}"
                    RadiusY="{Binding ElementName=TheWindow, Path=NiceRadius}" />
            </telerik:MapPathView.Data>
        </telerik:MapPathView>
    </DataTemplate>

    I have also add the property "NiceRadius" in code behind and set the window name to "TheWindow".

    Do you have any idea of what I did wrong ?

    Thank you!

  6. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 17 Mar 2014 Link to this post

    Hello Abder Rezak,

    In fact the MapPathView class is the wrapper for the MapShapeData. Because of its specifics it does not support the binding of this type. You can use data binding to properties of your data item only.

    Regards,
    Andrey Murzov
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready