Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
896
Add controls in XamRibbonWindow Title Bar
posted

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

Parents
  • 54937
    Suggested Answer
    Offline posted

    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.

Reply Children