MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

DialogHost can't take full width and height

Open Imperare opened this issue 4 years ago • 5 comments

My DialogHost can't take up all the space of the screen. Beyond 1450px in width, the height is reduced in despite of a width already equals to 1920px and height to 1080px in my code.

Expected

image

Currently

image

Behavior with a manual modification of the width only (height stays 1080px).

Gq2qq

Repo with a simple demo with only one step, "Restore NuGet Packages".

https://github.com/Imperare/PocDialogHost

I use 24" screens.

Imperare avatar Aug 26 '21 15:08 Imperare

unable to reproduce on 3440x1440 with PocDialogHost app

floatas avatar Oct 01 '21 10:10 floatas

I am able to reproduce the issue using the PocDialogHost app on a 1920x1080 24" screen.

guptaanmol184 avatar Oct 06 '21 07:10 guptaanmol184

@Imperare and @Keboo probably issue is not related to DialogHost component, but to restriction: https://docs.microsoft.com/en-us/dotnet/desktop/wpf/controls/popup-overview?view=netframeworkdesktop-4.8#popup-and-the-visual-tree

The width and height of the new window cannot be larger than 75 percent of the width or height of the screen

Erapchu avatar Dec 03 '21 07:12 Erapchu

Something to be aware of is the DialogHost has a DialogMargin property which is contributing to the behavior here. Will check out that link too.

Keboo avatar Dec 03 '21 07:12 Keboo

I didn't know this restriction, thanks for your answer.

Imperare avatar Dec 03 '21 13:12 Imperare