I have already tried different options including info in this question Make my wpf application Full Screen (Cover taskbar and title bar of window), but nothing helped me Only IgnoreTaskbarOnMaximize property works correct, but it is used from the MahApps, which is not compatible with Xamarin Forms. Maybe you know how to implement IgnoreTaskbarOnMaximize manually?
Asked
Active
Viewed 501 times
2 Answers
1
As far as I can tell from this tutorial on using Xamarin.Forms with WPF, the Xamarin.Forms application is created from a Window
public partial class MainWindow : FormsApplicationPage
{
public MainWindow()
{
InitializeComponent();
Forms.Init();
LoadApplication(new My.App());
}
}
with or without the respective XAML file (should not matter that much, unless the InitializeComponent
is not called without a XAML file). If there is a XAML file for your window, I'd suppose that this solution would work out
<wpf:FormsApplicationPage ResizeMode="NoResize" WindowState="Maximized" ...>
<!-- Not sure whether the grid is needed in here -->
</wpf:FormsApplicationPage>
otherwise you'd have to set the properties from your window class
public class MainWindow : FormsApplicationPage
{
public MainWindow()
{
// whatever there is to be done before
this.ResizeMode = ResizeMode.NoResize;
this.WindowState = WindowState.Maximized;
Forms.Init();
LoadApplication(new My.App());
}
}

Paul Kertscher
- 9,416
- 5
- 32
- 57
-
Thanks for your answer, but as I already said this and other solutions from the topic below didn't help me. – Emilia Larssen Feb 26 '20 at 08:14
-
@EmiliaLarssen Unfortunately you did not give too many information on *what* you've actually tried. Hence my answer was only a shot in the dark :) – Paul Kertscher Feb 26 '20 at 08:16
-
@EmiliaLarssen Ah, I see what you mean. There is no title bar when I do not initialize the Window as a Xamarin.Forms `FormsApplicationPage`, but as soon as I do, there is a title bar. – Paul Kertscher Feb 26 '20 at 09:35
-
When I tried to test your solution on a new clear WPF app it worked perfectly, but the same modifications on Xamarin Forms through WPF didn't help – Emilia Larssen Feb 26 '20 at 14:24
-
Yes, it what I am talking about) – Emilia Larssen Feb 26 '20 at 14:26
-
@EmiliaLarssen It's quite complicated. There is a workaround of sorts, but this makes more problems than it solves :/ – Paul Kertscher Feb 26 '20 at 14:27
-
anyway I like problems – Emilia Larssen Feb 26 '20 at 14:46
0
The solution is quite simple. If you want to make your application full screen (with taskbar covering) don't set WindowState to Maximized, just change Width and Height like this after InitializeComponent();
public MainWindow()
{
InitializeComponent();
Top = 0;
Left = 0;
Height = SystemParameters.PrimaryScreenHeight;
Width = SystemParameters.PrimaryScreenWidth;
Forms.Init();
LoadApplication(new SharedForms.App());
}

Emilia Larssen
- 65
- 13