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.

Drag/Dropping Window to Maximized Cuts Taskbar (BorderOnly Deco)

See original GitHub issue

Discussed in https://github.com/AvaloniaUI/Avalonia/discussions/11222

<div type='discussions-op-text'>

Originally posted by ArchLeaders May 3, 2023 I’m setting up a custom window chrome for my application, but I’m getting some weird behavior with the drag/drop to fullscreen action in Windows 10.

Setting WindowState to WindowState.Maximized works just fine, but when I drag the window to the top of the screen and drop it cuts out the task bar and about 7 pixels off the side of the window.

https://user-images.githubusercontent.com/80713508/236018412-8c7b7983-62ab-4fbd-b272-6aa63c661e9d.mp4

Is there a way to intercept this behavior and call whatever Avalonia does to fullscreen to the correct bounds instead? Or just another way to fix this?

  • Avalonia Version: 11.0.0-preview6 and 11.0.0-r1.1
  • OS: Windows 10</div>

Issue Analytics

  • State:open
  • Created 3 months ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
timuniecommented, Jun 7, 2023

Window has a property called OffScreenMargin. Can you try to apply this to your inner Content?

<Window xmlns="https://github.com/avaloniaui"
        ... other namespaces etc ... >
   <Grid Margin="{Binding $parent[Window].OffScreenMargin}">
     ... Content ...
   </Grid>
</Window>
0reactions
ApaulMyLittleAirportcommented, Jul 9, 2023

Margin="{Binding $parent[Window].OffScreenMargin} ,This one really works, thank you!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lower part of a window hidden behind the taskbar
My Solution: don't maximize windows, resize them to fit the viewable window, just inside the taskbar. It gets a little tricky when you...
Read more >
The Windows 11 taskbar is an annoying step backward
Now the Win11 UI is so slow that it feels like every click must be hitting telemetry first. When I right click I...
Read more >
When I drag my windows around only the border moves?
Right click This Computer, select Properties, select Advanced System Settings, Advanced Tab, click on Performance Settings, check "Show window ...
Read more >
how to get rid of top window borders in Ubuntu
It's very simple and works seamlessly. It just ensures that every window opens up maximized, and that every maximized window has no titlebar....
Read more >
How To Hide/Show Window Contents While Dragging In ...
How To Hide/Show Window Contents While Dragging In Windows 10 [Tutorial] You can configure the Windows 10 operating system to show an ...
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