My WPF application (with Elysium Extra) has a margin on the right side of the window when I click the fullscreen button:
On the right side you can see my desktop background.
I checked if there is a margin, but it is set to 0 px
on all sides.
I have also set
this.MaxWidth = SystemParameters.MaximizedPrimaryScreenWidth;
this.MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight;
App.xaml:
<extra:ElysiumApplication x:Class="CTS.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:extra="http://schemas.extra.com/ui"
xmlns:local="clr-namespace:CTS"
Theme="Dark"
StartupUri="MainWindow.xaml" />
MainWindow.xaml:
<extra:Window x:Class="CTS.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:extra="http://schemas.extra.com/ui"
xmlns:local="clr-namespace:CTS"
mc:Ignorable="d"
Title="..." Height="521.877" Width="1239.945" FontFamily="Open Sans" Foreground="#FF0970D1" Background="#FF22313F">
....
Edit: I have checked the Elysium Extra demo application. It also has the same problem, so it seems like it is caused by the Framework. However, I'd like to keep on using it.
How can I get rid of this margin?
Tip: touch and hold the empty space on your home screen and select Wallpaper at the bottom to reach the wallpaper setting screen. Pick the image you want to use as your background. Once your image (portrait or landscape) is selected, you will see a preview of your wallpaper filling up your whole screen.
If you're experiencing issues with your desktop background image in Windows, check that the original wallpaper hasn't been deleted or moved and that you're not running Windows in Safe Mode (which disables the wallpaper feature).
Have a look at this: http://stackoverflow.com/a/24818071/4587181 It uses some Windows32 interop to set the Windows margins right. Because this problem also happens when you use your own custom Window chrome (WindowStyle = None), I experienced it. This SO answer solved it. Good luck
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With