Is there a datasource for RibbonTabs?

Ribbon for WPF Forum

Posted 11 years ago by Liang Ma
Version: 12.2.0573
Avatar

From the sample, I see the ribbon tabs are hard coded. Is there a way to adapt the MVVM pattern on it? For example:

<ribbon:Ribbon x:Name="ribbon" DockPanel.Dock="Top" RibbonTabs={Binding RibbonTabsViewModel}>

Here is orignal sample.

<ribbon:Ribbon x:Name="ribbon" DockPanel.Dock="Top">
<ribbon:Ribbon.LayoutTransform>
<ScaleTransform ScaleX="{Binding ElementName=scaleSlider, Path=Value}" ScaleY="{Binding ElementName=scaleSlider, Path=Value}" />
</ribbon:Ribbon.LayoutTransform>

<!--
Use pre-defined WordApplicationMenu, WordHomeTab, WordInsertTab types in the sample project so that we don't have redundant code
in this sample that takes away from the focus of the sample
-->
<ribbon:Ribbon.ApplicationMenu>
<ribbonSamplesCommon:WordApplicationMenu />
</ribbon:Ribbon.ApplicationMenu>

<ribbon:Ribbon.Tabs>
<ribbonSamplesCommon:WordHomeTab />
<ribbonSamplesCommon:WordInsertTab />
<ribbon:Tab Label="Page Layout" KeyTipAccessText="P" />
<ribbon:Tab Label="References" KeyTipAccessText="S" />
<ribbon:Tab Label="Mailings" KeyTipAccessText="M" />
<ribbon:Tab Label="Review" KeyTipAccessText="R" />
<ribbon:Tab Label="View" KeyTipAccessText="W" />
</ribbon:Ribbon.Tabs>
</ribbon:Ribbon>

Comments (3)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Liang,

I'm sorry but the Ribbon itself doesn't support MVVM like that at this time.  I'll make a note of the request.


Actipro Software Support

Posted 11 years ago by Chris Ray
Avatar

I noticed that MVVM on the ribbon was requested 3 years ago, and now again 3 months ago. "notes" have been made about the request. Can you be more specific? Will this be implemented in the next few months or not?

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Chris,

We do have it logged as a request but haven't worked on it.  We have to prioritize all requests with the hundreds of requests across this product and others.  At the moment, we don't have specific plans to implement this in the near term since it would require some major rewriting of Ribbon and all its child controls.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.