Change Shape color on the fly

5 posts, 0 answers
  1. Jeremy
    Jeremy avatar
    16 posts
    Member since:
    May 2010

    Posted 13 Feb 2011 Link to this post

    Is it possible to change the color of each shape on the fly?  I'm working on a heatmap that will be pulling some data either from SharePoint or a db.  There will be various filters to narrow down the results and I'd like to be able to change the color of the active countries based on those filters.

    Thanks,
    Jeremy
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 16 Feb 2011 Link to this post

    Hello Jeremy,

    You can use Fill property of the map shape object for this purposes. For example:

    shape.Fill = new SolidColorBrush(Colors.Yellow);

    I hope this information helps.

    Best wishes,
    Andrey Murzov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Dipti
    Dipti avatar
    37 posts
    Member since:
    Dec 2011

    Posted 28 Dec 2011 Link to this post

    Hi Jeremy,

    I have the exact same requirement. Please let me know how did you get this working.

    Thanks.
    ~Dipti.
  5. Dipti
    Dipti avatar
    37 posts
    Member since:
    Dec 2011

    Posted 28 Dec 2011 Link to this post

    Hi Andrey,
    Can you please elaborate and give an example of how this can be done?
    How can we locate the shape on the RadMap for which the color needs to be changed?

    Thanks
    ~Dipti
  6. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 30 Dec 2011 Link to this post

    Hi,

    You can review the Theatre Hall online example here that demonstrates how you can colorize the map shapes (the seats) based on some business condition.

    Regards,
    Evgenia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner