angelsix / fasetto-word

The new chat application for Fasetto, completely open-source :)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When Window is Maximized, it goes under the TaskBar.

belfed opened this issue · comments

Hello Luke,
I used your project as a base for a far simpler application but the WindowResizer class is left untouched: when the Window is maximized it seems to go under the TaskBar, covering part of the content.

This is what the Window looks like when the WindowState is set to Normal:
normal_window

And this is the result when the Window is maximized:
maximized_window

As you can see, the Button at the bottom of the Window is not visible.

Now, I dug into the WindowResizer class and I played a bit with the min/max assignments inside the WmGetMinMaxInfo() and, from the L405, I replaced the code like this:

lMmi.PointMaxSize.X = (int)SystemParameters.WorkArea.Width;
lMmi.PointMaxSize.Y = (int)SystemParameters.WorkArea.Height;

In this way the Window does no longer go under the TaskBar. However, I have a second monitor (1920x1080) to the right of the primary one (2560x1440) and when I drag the Window in the second monitor and I maximize it, it mantains the primary monitor sizes and overflows the borders. So, first of all I don't think what I did is the right way to do it and I think that, somewhere and somehow, I need to update those X and Y when the monitor changes. I'm not really into the thing, so I would like to know how the problem could be fixed.
Do you have the same problem? Thank you and keep on the hard work! 😊

Have you tried the latest source code? I fixed lots of little bugs like this. Currently the latest source has no known issues like this but the original (in the recorded video) did.

Yes, I already took the WindowResizer class from the master branch, I hope it is not related to what I did inside the WindowViewModel since I added some visual elements that affects the dimensions of the Window (I added a coloured outline border). If it's not too much to ask, you could check the complete repo of what I'm doing here. Thank you.

P.S. Please don't mind the italian comments!

It works in combination with MainWindow.xaml and WindowViewModel

Your issue is your MainWindow.xaml doesn't have the Window.Resources to obay the margins and paddings of the window resizer

Hello Luke,
it actually was the Window.Resources, in particular the binding of the various properties regarding the outer margins.
Thank you very much for the help!