on Jul 20, 2010
I need help in figuring out the best architecture for using RibbonBar buttons to make changes to controls within a RadPane. Here's an abbreviated version of my application:
I have a Docking control that contains a RadPane, and within the pane is a gridview (similar to a master list). When a user clicks on a row in the grid, a new RadPane opens up displaying the details view w/ alot more data about the parent. The application also has a ribbon bar w/ context-sensitive tabs and buttons that need to be displayed and/or disabled depending on whether the user has selected the master or details pane. The ribbonbar buttons need to interact w/ the panes by determining, for example, which dataset is displayed and how it is displayed (in a stacked bar graph, line graph, etc). From a detail view, the user also needs to be able to (preferably using ribbon bar buttons) to navigate to the next row in the master grid.
I can manage to get the above requirements working, albeit perhaps not in the most elegant fashion. Where my app fails is in meeting the requirement that *multiple* child panes be instantiated w/ the ribbon bar buttons making changes to the visible child and only the visible child.
My latest approach is to attempt to use a common VM between the master pane, child pane, and the relevant ribbon buttons. When clicked the ribbon button uses a CallMethodAction on the VM; there are no errors to report but it doesn't seem to be using the right instance of the VM b/c the control's data in the panes is not affected.
Is this possible to accomplish, and if so, is there an optimal approach? Thanks in advance for your assistance.