WPF WindowChrome Title Bar User Profile Button

by Avatar Bill Henning (Actipro)
Friday, February 14, 2020 at 2:39am

Actipro WPF Controls v2020.1 development is in progress, and the new version’s main goals are to modernize our UI control features/themes, and make theme customization much easier.

In the previous post, we saw how WindowChrome supported placing a Back button in a Window title bar.  In today’s post, we’ll add a user profile button to the title bar instead.

Title Bar Buttons

The 2020.1 version makes it easy to add custom title bar content when using WindowChrome.  In fact, you can customize the left, center, or right portions of the title bar however you like.

Let’s see how a user profile button looks in the title bar.

A user profile button showing a popup menu

When we click the button, a popup opens with some information about the user and a Sign Out menu item.  This sample mimics the user profile button found in the Visual Studio title bar and makes use of our Shared Library's PopupButton control.

PopupButton can open any Popup or ContextMenu in response to a click.  It's extremely flexible in the content it can display.

Summary

With the new features coming to WindowChrome, it’s very easy to add buttons or any other content to any part of the title bar.

Post in the comments below if you have any feedback or questions about WindowChrome title bar customization.

Actipro's WPF Controls

Over 100 UI controls for building beautiful Windows Presentation Foundation desktop apps.

Learn More

Over 100 UI controls for building beautiful Windows Presentation Foundation desktop apps.

Includes editors, docking windows, MDI, property grids, charts, tree controls, ribbons, gauges, themes, and much more.

Learn More Download Free Trial

Add Comment

Please log in to a validated account to post comments.