Reputation: 351
I'm using avalonia (version 0.10.3 - but the same happened with 0.10.0 - on Net5.0 project) as the UI for a project and when I create for instance a splash or an about screen, the title bar must be invisible.
On windows this works just fine with these parameters in the window section :
CanResize="False"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="0"
Unfortunately, on Linux (mint - latest version with latest updates), the title bar remains visible (also if I set ExtendClientAreaTitleBarHeightHint="-1").
Is this a known issue or am I doing something wrong ?
I do not have a mac, but is that also the case for mac ?
Upvotes: 2
Views: 5647
Reputation: 95
This is how this can be achieved in Avalonia 0.10.18
<Window ...
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="-1"
SystemDecorations="BorderOnly">
Note SystemDecorations="BorderOnly"
attribute. If it is not set, decorations are hidden on Windows but not on Linux.
I found this solution in one of the posts in related Avalonia bug https://github.com/AvaloniaUI/Avalonia/issues/5829#issuecomment-841700569
Upvotes: 4
Reputation: 1
I had a similar problem but I "solve it" by defining the window property as:
WindowState = WindowState.FullScreen;
Comparing with Normal or Maximized, with title bar in fullscreen remains hidden.
Upvotes: 0
Reputation: 3623
X11 uses so-called "server decorations". Window frame is drawn by a window manager in a separate process, so it's not really possible to extend into that area.
You can still disable the frame completely and draw your own, but in general it's not really recommended since you will break advanced window interactions in basically every non-GNOME based Linux distro (GNOME doesn't care because it doesn't have any advanced window interactions).
In some future version Avalonia would use a custom-drawn frame for GNOME with a configuration option to ignore your user's preferences in favor of a fancy looking window border for other desktop environments as well, but it's not implemented yet.
Upvotes: 4