Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OverlappedPresenter.IsMaximizable Does Not Work As Expected With ExtendsContentIntoTitleBar #8783

Closed
DJRM2021 opened this issue Aug 22, 2023 · 1 comment
Labels
area-Windowing team-CompInput Issue for IXP (Composition, Input) team

Comments

@DJRM2021
Copy link

Describe the bug

When using OverlappedPresenter.IsMaximizable = false, the app window's maximize button "looks" disabled, but still clickable and will make the window to maximize.

Steps to reproduce the bug

  1. Create a new WinUI 3 Packaged Project in VS 2022.
    image
  2. In the MainWindow.xaml.cs file, go to public MainWindow() constructor.
  3. Insert the following code after the this.initializeComponent():
    public MainWindow()
    {
    this.InitializeComponent();
    WindowTitleBar = AppWindow.TitleBar;
    WindowTitleBar.ExtendsContentIntoTitleBar = true;
    WindowTitleBar.PreferredHeightOption = TitleBarHeightOption.Standard;
    OverlappedPresenter windowPresenter;
    windowPresenter = (OverlappedPresenter)AppWindow.Presenter;
    windowPresenter.IsMaximizable = false;
    windowPresenter.IsMinimizable = true;
    windowPresenter.IsResizable = false;
    }

Expected behavior

The maximize button should be completely disabled and the window should not be maximizable.

Screenshots

No response

NuGet package version

Windows App SDK 1.4 Preview 2: 1.4.230811000-preview2

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Visual Studio 2022

Additional context

No response

@bpulliam bpulliam transferred this issue from microsoft/WindowsAppSDK Aug 24, 2023
@bpulliam bpulliam added area-Windowing team-CompInput Issue for IXP (Composition, Input) team labels Aug 24, 2023
@eduardobragaxz
Copy link

Duplicate of #8666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windowing team-CompInput Issue for IXP (Composition, Input) team
Projects
None yet
Development

No branches or pull requests

3 participants