【发布时间】:2015-07-26 02:37:24
【问题描述】:
如何将窗口的 MaxHeight 属性设置为屏幕高度?
XAML:
<Window x:Class="RT.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{Binding WindowTitle}" Height="300" MaxHeight="500" Width="495.149" SizeToContent="WidthAndHeight">
【问题讨论】:
-
屏幕是什么意思?是你的显示器吗?如果你没有定义任何 MaxHeight 那么就意味着没有 MaxHeight 对吗?
-
@Krishna 是的,我的意思是我的显示器。如果我不定义 MaxHeight 窗口会超过屏幕尺寸(高度)
-
请看我的回答