Expander in WPF using VB.NET

In this article you will learn how to create a Expander in WPF.
  • 2163
Expander has extra facility to expand content as compare to GroupBox. Expander wraps a region of content and By clicking a small arrow button user can show or hide the content. The IsExpanded property determines if the panel is expanded or not. ExpandDirection is used to make the content expanded behaviour. You can use the four Directions, Down, Up, Right and Left to change the Expanded direction of the content. Expander is frequently used in online help and on web pages to include large amounts of content without overwhelming users with information they don't want to see.

Example of GroupBox

Window x:Class="MainWindow"
    Title="MainWindow" Height="350" Width="525">
        <Expander Margin="5" Padding="5" Header="Form 1">
            <Button Padding="3">Click to open form 1</Button>
       <Expander Margin="5" Padding="5" Header="Form 2" >
            <TextBlock TextWrapping="Wrap">
Sorry for inconvience, form is under process...
        <Expander Margin="5" Padding="5" Header="Form 3">
            <Button Padding="3">Click to open form 3</Button>
        <Expander Margin="5" Padding="5" Header="Form 4">
            <Button Padding="3">Click to open form 4</Button>




Hope this article help you to understand about Expander in WPF.


More Articles

© 2020 DotNetHeaven. All rights reserved.