Unanswered Dynamically creating Ribbon control with PRISM

  • 9 สิงหาคม 2555 12:49
     
     

    My requirement is that each module can define its own RibbonTab, or can also define just a RibbonGroup to be added to an existing tab or just RibbonButtons to be added in existing tab>group.

    What I did so far is each module will define its own RibbonTab in xaml file, so the tab is added if a tab with same header doesn't exist but if tab already exists its group would be detached and added to the existing tab. Similarly if group exists it child controls are detached and added to the group that already exists.

    But the problem I am getting with this approach is all the binding of buttons to their ICommands also breaks down.

    My question is how can I best solve my requirement. Otherwise if the approach I am using is fine, how can I keep binding intact.

    I am using WPF, PRISM 4.1, MEF without MVVM pattern currently since I am porting some existing code. But willing to adopt MVVM eventually.

    Thanks.

ตอบทั้งหมด