MicaWPF icon indicating copy to clipboard operation
MicaWPF copied to clipboard

[Bug]: Title Bar Content doesn't account for NoResize ResizeMode

Open itisrazza opened this issue 1 year ago • 0 comments

Describe the bug

I have a right-aligned button in the titlebar content and it looks like it always assumes the window controls to be a full-size (minimise, maximise and close) instead of collapsing when NoResize is set.

Steps to reproduce the bug

<controls:MicaWindow x:Class="SuperSize.Windows.SettingsWindow"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                     xmlns:controls="clr-namespace:MicaWPF.Controls;assembly=MicaWPF"
                     xmlns:local="clr-namespace:SuperSize"
                     mc:Ignorable="d"
                     Title="SuperSize Settings"
                     Width="320" Height="500"
                     ResizeMode="NoResize"
                     Closing="OnWindowClosing">
    <controls:MicaWindow.TitleBarContent>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
            <controls:Button Margin="5,0,0,0" Padding="4,4">
                <controls:SymbolIcon Symbol="Info24" />
            </controls:Button>
        </StackPanel>
    </controls:MicaWindow.TitleBarContent>

Expected behavior

The right-aligned content should be right next to the close button.

Screenshots

image

Windows version

Other (Please add the version in additionnal context.)

.Net Version

.NET 8.x

.MicaWPF Version

MicaWPF

Additional context

OS: Windows 11 24H2

itisrazza avatar Dec 10 '24 19:12 itisrazza