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

Add support to hide Minimize / Maximize window buttons #3422

Open
Symbai opened this issue Jan 9, 2020 · 9 comments · May be fixed by #18117
Open

Add support to hide Minimize / Maximize window buttons #3422

Symbai opened this issue Jan 9, 2020 · 9 comments · May be fixed by #18117

Comments

@Symbai
Copy link
Contributor

Symbai commented Jan 9, 2020

CanResize has no effect on these buttons and won't hide them either. Window can still be maximized or minimized and there are certain windows where this is not wanted at all, such as dialogs. I would suggest adding a boolean property for each of it but something like WPF's windowstyle="Toolwindow" should do it as well.

@odalet
Copy link
Contributor

odalet commented Sep 10, 2020

I'd add that for completeness, hiding the close button and the window icon (on the left at least in Windows) would be interesting. I don't know though if the last one makes sense for Linux and MacOS

@jp2masa
Copy link
Contributor

jp2masa commented Sep 10, 2020

Hiding the window icon is related to #4474.

@Tridy
Copy link
Contributor

Tridy commented Dec 12, 2020

Since there is Window.ShowDialog, this can be used as MessageBoxes in some cases, and the option for removing all 3 buttons or disabling them would be a nice.

@AntonNah
Copy link

Any news?

@mohdimas
Copy link

Any update on this one?

@tofutim
Copy link

tofutim commented Oct 24, 2021

I also am interested in this for a tool window.

@TomEdwardsEnscape
Copy link
Contributor

+1, disabling individual window title bar buttons (separately from tool window styling) would be wonderful.

This is easy to implement in Windows with just a couple of P/Invoke calls, but on Mac you have to write and compile new Objective-C++ code. No idea about X11.

Code for Windows: already exists in Avalonia, but in a private method.

Code for OSX: this is how Qt handles the job in Objective-C++

@slxdy
Copy link

slxdy commented Jun 8, 2024

Bump. It's been almost a year since the enhancement tag has been applied.

I feel like this feature should get prioritized, considering it's one of the most basic features any UI framework should have.
You can't even disable the maximize button without preventing users from resizing the window.

@timunie
Copy link
Contributor

timunie commented Jun 9, 2024

Hi @slxdy

If you need priority on any issue please reach out to the team in case you have a support agreement. Otherwise you can request paid support, file a PR or wait until it's done.

Because Avalonia is still OSS, it means things are done when they are done.

Thanks for your understanding 🤗

Tip

Some libs like FluentAvalonia have such controls available.

@MrJul MrJul linked a pull request Feb 4, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.