-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cannot fully programatically maximize window. #1823
Comments
@pingu2k4 which version? |
Apologies. Version 1.1.1.0. As can probably be seen by the simplicity of the program so far I am kind of new to this framework, but I can't find how to do this anywhere I search online, and I'm sure that it should work correctly with what I have... |
Just an update - I am now at home where I have 2 monitors and not just 1. |
OK, so I have found out where the problem lies. I had set
I am happy with using this whether I should have to or not really... I'll just keep this open for time being in case you want to do anything with this still. :) Feel free to close though. |
hi everyone, |
@davidefu Should be fixed now in latest pre-release. As a workaround (with latest stable 1.2.4) set the ResizeMode in loaded event this.Loaded += (sender, args) => this.ResizeMode = ResizeMode.NoResize; |
thanks |
hi, By the way wich is the correct way to create a full (with no taskbar overlapping) non resizable window? Thanks |
@davidefu Is this a normal running Win10? or is it inside a VM? You can use void MainWindow_StateChanged(object sender, EventArgs e)
{
if (this.WindowState != System.Windows.WindowState.Maximized)
{
this.WindowState = System.Windows.WindowState.Maximized;
}
} Here is the working xaml (without any code behind stuff) that works here on my win 7 prof 64 bit machine <Controls:MetroWindow x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
Title="MainWindow"
Width="525"
Height="350"
ResizeMode="NoResize"
IsMinButtonEnabled="False"
IsWindowDraggable="False"
Topmost="True"
WindowState="Maximized"
WindowStyle="None">
<Grid Background="Red">
<TextBlock><Run Text="1.3.0.134" /></TextBlock>
</Grid>
</Controls:MetroWindow> |
@davidefu by the way, the shortcut windows + down arrow is normal behavior in win 10, just tested it out with normal window instead MetroWindow. And, I take your sample with my changes and run it inside VMWare with Win10... and it works :-( |
hi, thanks |
ok, i'll try on my VM and PC this setting with Win 10, but not with a surface, that's not my price class :-)
taskbar issue is (should be) fixed with MahApps.Metro 1.3.0-ALPHA137
i don't know, maybe you can prevent the keys in preview key events
setting the maximized state in the state event is not a good idea
yeah maybe this is an issue with your settings of the dpi zoom... |
great. l'll be happy to test the next release |
@davidefu by the way |
@punker76 now in the alpha 137 resizemode="NoResize" and WindowState="Maximized" seems to be good friends also with high dpi monitor. Thanks a lot for the support. `private const int WM_SYSCOMMAND = 0x0112;
extra detail here https://msdn.microsoft.com/en-us/library/windows/desktop/ms646360(v=vs.85).aspx |
@punker76 |
can be that a possible related issue? http://stackoverflow.com/questions/19280016/windowchrome-resizeborderthickness-issue |
@davidefu please try again with 1.3.0.145, thx!!! |
@davidefu any news? |
@punker76 hi, the test app attacched is working fine. |
i notice a strange issue. |
I think we can't fix this in a good way, NoResize and maximized window is
|
the win+arrow was not possible in previous alpha (except for win+down) the window overlap the taskbar only if i the the resize mode in loaded event and nothing in the xaml |
the alpha141 has good bahavior except for the runtime issue regarding the borderthickness |
|
Hi,
Having this live of code called:
this.WindowState = System.Windows.WindowState.Maximized;
does change the size of the window, however there are borders all around the window, where the window isn't touching the edge of the screen or the taskbar. Here is my opening window tag:
Effectively, I want to come out of fullscreen as it is set to when it launches, and have it take up all the screen but not cover the taskbar... Which it does apart from it leaves this strange gap around....
The text was updated successfully, but these errors were encountered: