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

RadDiagram (Financial Dash ex) w/Search Box

2 Answers 38 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 13 Apr 2013, 06:44 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Francois Vanderseypen
Top achievements
Rank 2
answered on 13 Apr 2013, 07:06 PM
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.
0
Michael
Top achievements
Rank 1
answered on 13 Apr 2013, 07:09 PM
Exactly, OnApplyTemplate() doesn't do what i really need. Thanks for the tip
Tags
Diagram
Asked by
Michael
Top achievements
Rank 1
Answers by
Francois Vanderseypen
Top achievements
Rank 2
Michael
Top achievements
Rank 1
Share this question
or