Enabling Scrollbar in WPF

后端 未结 1 555
后悔当初
后悔当初 2020-12-17 07:35

I\'m having a problem right now where my WPF application hides anything below the fold when the window is too small vertically. How can I use XAML to get a vertical scrollb

相关标签:
1条回答
  • 2020-12-17 08:13

    Put a ScrollViewer inside your Window:

    <Window x:Class="WpfApplication2.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Window1" Height="300" Width="300">
    
        <ScrollViewer >
            <!-- Window content here -->
        </ScrollViewer>
    </Window>
    
    0 讨论(0)
提交回复
热议问题