private void CoreTitleBar_LayoutMetricsChanged(CoreApplicationViewTitleBar sender, object args)
{
if (FlowDirection == FlowDirection.LeftToRight)
{
CustomDragRegion.MinWidth = sender.SystemOverlayRightInset;
}
else
{
CustomDragRegion.MinWidth = sender.SystemOverlayLeftInset;
}
// Ensure that the height of the custom regions are the same as the titlebar.
CustomDragRegion.Height = VBtn.Height = sender.Height;
}
Using latest WinUiEx 2.2.0
how to do it with the winuiex window