UWP Transparent title bar

In the last post I extended the view into the title bar on a UWP application, which looks great with the NavigationView or the likes.

However, if you then place a view, such as a SplitView, on the right of the screen the title bar buttons (minimize, maximize and close) will appear in a different colour (if using the default colours).

So we can make the button backgrounds transparent like this

var titleBar = ApplicationView.GetForCurrentView().TitleBar;
titleBar.ButtonBackgroundColor = Colors.Transparent;
titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;