Question

Here's the XAML code for a very simple WPF window:

<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>

When I open this window, the text Short text is displayed in full; however, the title bar only displays L... (the first letter of Long, verbose, unabridged title). I would like the opened window to be wide enough to display the full title, and no wider. Is there a way to do this?

Was it helpful?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top