RadDiagram (Financial Dash ex) w/Search Box

3 posts, 1 answers
  1. Michael
    Michael avatar
    16 posts
    Member since:
    Dec 2011

    Posted 13 Apr 2013 Link to this post

    Hi.

    I'm experimenting with the Financial Dashboard example and was wondering how difficult it would be to include a Text Box  on the MainPage.xaml page that updates all shapes that contain data.  I was able to add a search box and submit button within a custom shape using OnApplyTemplate(), but haven't had any luck with the MainPage textbox. Would appreciate some help on this if possible.

  2. Answer
    Francois Vanderseypen
    Francois Vanderseypen avatar
    46 posts
    Member since:
    Oct 2009

    Posted 13 Apr 2013 Link to this post

    Michael,

    there are two possibilities, independently whether you play with the dashboard or with some other diagramming app:
    • if you're using MVVM the textbox would alter the data in the MVVM model and through this the data in the shapes would be updated (or triggering a recalculation or fetching new data or whatever the business rule is).
    • if you are not using MVVM you can loop over the shapes contained in the diagram and alter either the Content or the DataContext or trigger a particular method of the individual shape.

    Using the OnApplyTemplate, as you suggested, is not very practical since it's only executed when a new shape is added and the control template is applied. This means that the logic contained therein is oblivious to triggers after the template has been applied.

    Hope this helps, Fr.
  3. DevCraft banner
  4. Michael
    Michael avatar
    16 posts
    Member since:
    Dec 2011

    Posted 13 Apr 2013 Link to this post

    Exactly, OnApplyTemplate() doesn't do what i really need. Thanks for the tip
Back to Top