Content in title bar (left of minimize/maximize/close)

Ribbon for WPF Forum

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was before this thread was created.
Posted 1 month ago by Bjørnar Sundsbø - Norway
Avatar

Hi,

For a while I've been missing the possibility to add content to the left of the minimize/maximize/close buttons of the RibbonWindow. Refering to examples such as the "log in" button in Visual Studio for the user account, or Teams for settings/availability, search, etc. Is this something you might be willing to add in a near future version?


Bjørnar Sundsbø

Comments (2)

Answer - Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Actually we already have that functionality.  WindowChrome supports it and it is demoed in our "Themes / MetroStyleWindow" demo in the samples.  If you look at the MetroWindow.xaml file there, you'll see how we set the WindowChrome.TitleBarContentTemplate to UI content.  That content can be a button or anything.

RibbonWindow uses a WindowChrome behind the scenes.  You can't create a new one as we do in that particular demo because you need to reuse the one we already create behind the scenes.  To get to it, you can call this after InitializeComponent in a RibbonWindow-based constructor:

var chrome = WindowChrome.GetChrome(this);

Then set the properties on that chrome instance.


Actipro Software Support

Posted 1 month ago by Bjørnar Sundsbø - Norway
Avatar

Oh yeah. I've seen this sample years ago, but had completely forgotten. Thanks. Will check it out again. Thanks.


Bjørnar Sundsbø

Add Comment

Please log in to a validated account to post comments.