You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a ContentDialog's Content property is set to a StackPanel that hosts at least one UI element like a TextBlock, then it creates a big empty gap (spacing) between the dialog content and the dialog buttons.
Thanks in advance and I just want to quickly say that I really appreciate this library and should have used it sooner for my projects! Pozdrowienia z Belgii panie Leszku 🥂🤍
To Reproduce
ContentDialog contentDialog = new()
{
Title = "My dialog",
CloseButtonText = "Cancel",
PrimaryButtonText = "Those who know",
DialogMaxWidth = 500,
DialogMaxHeight = 200,
DialogHost = RootContentDialog,
Content = new StackPanel
{
Children =
{
new TextBlock
{
Text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
TextWrapping = TextWrapping.Wrap
}
}
}
};
The TextWrapping = TextWrapping.Wrap line has no effect on whether the issue occurs or not.
Expected behavior
The blank empty space should not be created, it should just have a slight default spacing, more or less like the spacing between the title and the content of the dialog.
Screenshots
When the text is too long, it creates a huge blank gap as can be seen here:
When the text is short enough, the issue doesn't occur.
OS version
Windows 11
.NET version
.NET 8.0
WPF-UI NuGet version
WPF UI v3.0.5
Additional context
I tested the same code but in a WinUI 3 (WinAppSDK) project and it strangely does not occur in that environment.
The text was updated successfully, but these errors were encountered:
symonxdd
changed the title
StackPanel as Content in ContentDialog creates big blank space
Longer text as Content in ContentDialog creates big blank space
Nov 9, 2024
Describe the bug
When a ContentDialog's Content property is set to a StackPanel that hosts at least one UI element like a TextBlock, then it creates a big empty gap (spacing) between the dialog content and the dialog buttons.
Thanks in advance and I just want to quickly say that I really appreciate this library and should have used it sooner for my projects! Pozdrowienia z Belgii panie Leszku 🥂🤍
To Reproduce
The
TextWrapping = TextWrapping.Wrap
line has no effect on whether the issue occurs or not.Expected behavior
The blank empty space should not be created, it should just have a slight default spacing, more or less like the spacing between the title and the content of the dialog.
Screenshots
When the text is too long, it creates a huge blank gap as can be seen here:
When the text is short enough, the issue doesn't occur.
OS version
Windows 11
.NET version
.NET 8.0
WPF-UI NuGet version
WPF UI v3.0.5
Additional context
I tested the same code but in a WinUI 3 (WinAppSDK) project and it strangely does not occur in that environment.
The text was updated successfully, but these errors were encountered: