question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a way to get the Min / Max / Close- Button positions

See original GitHub issue

Is your feature request related to a problem? Please describe. I like the idea to render extend into the title bar and keep the system chrome alive with the Min/ Max/ Close buttons. Then I would like to place content like Tabs into the TitleBar. the issue I have is, that I cannot now how much space I have to reserve for the system window Buttons or on which side they are (I think on Mac they are on a different side then for Windows)

Describe the solution you’d like A property on the Window which tells me where some reserved space is, for example:

ReservedSpace[] ReservedSpaces = new ReservedSpace[] 
{ 
     new ReservedSpace (width: 75, height: 20, Position: Position.TopRight)
};

Describe alternatives you’ve considered

  • Hardcode these properties
  • Use custom buttons, but I learned that this is not a good idea, especially on Linux

Additional context See also: https://docs.avaloniaui.net/tutorials/music-store-app/creating-a-modern-looking-window

/cc @danwalmsley @ahopper this is a follow-up issue from our discussion on telegram.

Happy coding Tim

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Symbaicommented, Jan 29, 2022

On several WPF third party themes the customizable window header area is only from left to the first start of (min or max or close) button so you cannot draw anything on top of these controls. This seems to be much better than adding a new property which only returns the size and the developer has to calculate the distance himself .

2reactions
maxkatz6commented, Jan 28, 2022

Couple of thoughts:

  1. There should be an event, so application can adjust elements dynamically (on macos these buttons are hidden in fullscreen, and visible again in normal mode…). See https://stackoverflow.com/a/52803798
  2. Same API potentially can be used for reserved parts on mobile screens, including iphone notch
  3. It should use native APIs instead of some hardcoded “well known” values.
  4. I guess this API won’t be possible on Linux with some desktop implementations
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get size and position of window caption buttons ...
I've found the function required to get the position of the buttons in vista: WM_GETTITLEBARINFOEX. This link also shows the system metrics ...
Read more >
How to move the close, maximize and minimize buttons ...
If you just want to close window you can use CMD + W. After you get used to keyboard shortcuts you won't even...
Read more >
How to make Minimize Maximize Close button by code in C# ...
How to make Minimize Maximize Close button by code in C# : Minimize and maximize and closing button in often looks nice if...
Read more >
Move the Minimize, Maximize and Close buttons to the left ...
I would like to move the Minimize, Maximize and Close buttons to the left. I've Googled this, however i can only find outdated...
Read more >
View topic - [Solved] Min max close button layout
Hello I see that firefox does not follow min / max / close layout. (I am talking about the Orange/green/red dots/buttons at top...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found