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
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.
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,
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.
Finally I created multiple triggers which are bound to the Window Theme. If the theme changes, the color will change to the appropriate one. It works.
Well when run on a Vista system with glass enabled that area will be transparent so I'm assuming you mean when either glass is not being used. In our default templates (which you can find in the DefaultStyles directory), the background of the caption area is set to a dynamic resource with a key of igRibbon:RibbonBrushKeys.CaptionPanelFillKey and then set to a dynamic resource with a key of igRibbon:RibbonBrushKeys.CaptionPanelInactiveFillKey when the window is deactivated. So to control the active window caption color, you would put a brush with a key of igRibbon:RibbonBrushKeys.CaptionPanelFillKey in the xamRibbon's Resources. If you want that to be based on the theme then you would have to change the brush or color of the brush as you change the theme.
I was able to bound the document name and the application title in the title bar of the XamRibbonWindow.
Now I am trying to do something a little bit more complicated and I am not able for now to figure out.
I want to switch the brush of the Application title (displayed in the title bar) depending on the XAmRibbonWindow theme.
Do you have an idea of how I could do this? I still want to keep the behavior of the brush when the window is not selected...
The "Document" is essentially bound to the Title of the Window so just change the Title. For other customizations you would need to tweak the sample to your needs.
Thanks, I tried your sample I think this is in the good direction.
Do you know how I could make the Document name change when the selected document change? Or remove the "-" if there is no selected document?