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.
- ย้ายโดย Min ZhuMicrosoft, Moderator 10 สิงหาคม 2555 5:22 (From:Windows Presentation Foundation (WPF))
ตอบทั้งหมด
-
10 สิงหาคม 2555 6:42ผู้ดูแล
Hi Dami,
Since this question is about the PRISM usage, we suggest posting the question at the Prisom discussion page http://compositewpf.codeplex.com/discussions for better support.
Thanks for your understanding and support!
Best regards,
Min
Min Zhu [MSFT]
MSDN Community Support | Feedback to us
- แก้ไขโดย Min ZhuMicrosoft, Moderator 10 สิงหาคม 2555 6:42
-
10 สิงหาคม 2555 20:29Ok sure, sorry about that.