Hi ,
Is it possible to add a label or button in the XamRibbonWindow Title Bar?
Here is my requirement -
1. The Application Title should be displayed in the centre of the title/header bar. This feature is already available.
2. The logged in user name should be displayed on the right corner of the title/header bar.
3. The logout button should be displayed next to the user name on the right corner of the title/header bar.
thanks in advance
There are no properties specifically exposed for this but the contents of the title area is provided by a custom style whose key is RibbonCaptionPanel.CaptionStyleKey so you could provide a custom style for this key that contains the application name and triggers to change the color of the application section. We'll look into making this easier but for now I've provided an example of this approach in the attached sample.
Hi,
I Would like to know how it is possible to add in the title bar the [document name - application name] as it is mentioned in the Officle Fluent. Note that the application name must be in blue when the application is focused.
Any idea?
Thank you,
You can do this up to a point. You will need to provide custom templates for the RibbonWindowContentHost and the XamRibbon. You can use the default xaml that we ship with the product as a starting point - its included in the DefaultStyles directory. The CaptionArea element within the RibbonWindowContentHost is used when you are either not using a XamRibbon or when the XamRibbon is collapsed (e.g. when the AutoHideEnabled is true and the width/height is below the associated threshold property). In the xamRibbon though the caption, qat and contextual tab groups are all created/arranged by the RibbonCaptionPanel so as long as you want the button/login to be all the way to the right and take precedence over the area available to these items then you can probably put that element into a dockpanel and dock your textblock/button to the right - I think you'll need to move all the attributes except the name up to the containing dockpanel. You should also probably review the Office UI Guidelines to ensure that this does not violate your license agreement with MS to use the ribbon ui.