Answer the question
In order to leave comments, you need to log in
C# WPF why does Window.Left = 0 appear between screen border and window?
Visual Studio 2017, I create a new project (WPF Application), here is the main window class:
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Left = 0;
Top = 0;
Height = 1080;
Width = 1920;
}
}
Answer the question
In order to leave comments, you need to log in
It's not padding, it's the window border. The presence of a border and its thickness is set in the window properties or in styles, I don’t remember exactly, because it may be different in different OS versions.
This is the chrome of the window (WindowChrome), usually looks like a shadow around the window, is part of the window, on top of the client part. Usually the chrome size is 7px.
https://docs.microsoft.com/en-us/dotnet/api/system...
Chrome is disabled when the window is set to maximized (Maximized). And also, you can specify WindowStyle.None to the window, then the non-client part will be disabled.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question