lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
https://wpfui.lepo.co
MIT License
7.03k stars 666 forks source link

FullScreen bug #1112

Open X-Yunner opened 4 weeks ago

X-Yunner commented 4 weeks ago

Describe the bug

I want to make FluentWindow fullscreen, and I just need to execute the code in order while I'm on Window

WindowStyle = WindowStyle.None;
 ResizeMode = ResizeMode.NoResize;
 viewModel.MainWindowWindowState = WindowState.Maximized;

But not on fluentWIndow, it won't cover the whole screen, there will be margins, I tried many times, only in this order to be full screen.

ResizeMode = ResizeMode.NoResize;
viewModel.MainWindowWindowState = WindowState.Maximized;
WindowStyle = WindowStyle.None;

It's strange

To Reproduce

private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
    if (viewModel.TitleBarVisibility == Visibility.Visible)
    {
        //viewModel.TitleBarVisibility =Visibility.Collapsed;
        WindowStyle = WindowStyle.None;
        ResizeMode = ResizeMode.NoResize;
        viewModel.MainWindowWindowState = WindowState.Maximized;

        //ResizeMode = ResizeMode.NoResize;
        //viewModel.MainWindowWindowState = WindowState.Maximized;
        //WindowStyle = WindowStyle.None;
    }
    else
    {
        viewModel.TitleBarVisibility  = Visibility.Visible;
        ResizeMode = ResizeMode.CanResize;
        WindowStyle = WindowStyle.SingleBorderWindow;
        viewModel.MainWindowWindowState = WindowState.Normal;

    }
}

Expected behavior


 WindowStyle = WindowStyle.None;
 ResizeMode = ResizeMode.NoResize;
 viewModel.MainWindowWindowState = WindowState.Maximized;
``` can fullscreen

### Screenshots

_No response_

### OS version

win11

### .NET version

.net 8

### WPF-UI NuGet version

3.0.4

### Additional context

_No response_
m0lDaViA commented 3 weeks ago

Any screenshots? Rn it's a bit hard to fully understand your problem.

m0lDaViA commented 1 week ago

@X-Yunner If you no longer have a problem, please close this ticket.