【问题标题】:Making SizeToContent take Title into account使 SizeToContent 考虑 Title
【发布时间】:2012-10-13 10:27:54
【问题描述】:

这是一个非常简单的 WPF 窗口的 XAML 代码:

<Window x:Class="TitleTester.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Long, verbose, unabridged title" SizeToContent="WidthAndHeight">
    <Grid>
        <Label>Short text</Label>
    </Grid>
</Window>

当我打开这个窗口的时候,文字Short text会完整显示;但是,标题栏只显示L...Long, verbose, unabridged title 的第一个字母)。我希望打开的窗口足够宽以显示完整标题,而不是更宽。有没有办法做到这一点?

【问题讨论】:

    标签: wpf xaml resize title sizetocontent


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2011-06-20
      • 2016-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-13
      • 2020-08-23
      • 2014-12-25
      相关资源
      最近更新 更多