StackPanel in a ScrollViewer : ScrollViewer « Windows Presentation Foundation « C# / CSharp Tutorial






<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ScrollViewerWithExpander" Height="300" Width="300">
    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <StackPanel Orientation="Vertical">
            <Button Width="200" >A</Button>
            <Expander Header="Expand me" BorderThickness="3" BorderBrush="Black">
                <StackPanel>
                    <Button>B</Button>
                    <Button>C</Button>
                    <Button>D</Button>
                </StackPanel>
            </Expander>
            <Button Padding="10 4" HorizontalAlignment="Right">E</Button>
            <Button HorizontalAlignment="Stretch">F</Button>
        </StackPanel>
    </ScrollViewer>
</Window>
WPF Stack Panel In A Scroll Viewer








24.53.ScrollViewer
24.53.1.Put Canvas into ScrollViewerPut Canvas into ScrollViewer
24.53.2.Default Thumb StyleDefault Thumb Style
24.53.3.StackPanel in a ScrollViewerStackPanel in a ScrollViewer
24.53.4.ScrollViewer and Big EllipseScrollViewer and Big Ellipse
24.53.5.Use the content-scrolling methods of the ScrollViewer classUse the content-scrolling methods of the ScrollViewer class
24.53.6.Scroll Buttons with ScrollViewer