我的 xml 代码如下。
<ChildWindow x:Class="Donas.Client.Common.MessageWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="450" Height="180" MaxHeight="600" FontFamily="Malgun Gothic" FontSize="12"
Title="Title">
Show()
虽然我将最大高度设置为 600px,但在调用方法后最大高度更改为 Infinity 。我从调试中注意到了这一点。我想知道为什么最大高度变为无穷大以及如何防止这种情况。