Xceed Toolkit for .NET Maui v2.0 Documentation
Xceed.Maui.Toolkit Assembly / Xceed.Maui.Toolkit Namespace / Expander Class
Members Example


In This Topic
    Expander Class
    In This Topic
    A control offering a ToggleButton that allows to show or hide its Content.
    Syntax
    'Usage
     
    
    Dim instance As Expander
    Remarks

    The Content is visible when the Expander is expanded & hidden when it is collapsed.

    However, the Expander's Header is always visible.

    Example

    The following code would display this control:

    <xctk:Expander WidthRequest="200"
                   Direction="Down">
      <xctk:Expander.Header>
        <Label Text="My Expander"
               HorizontalOptions="Center"/>
      </xctk:Expander.Header>
      <xctk:Expander.Content>
        <VerticalStackLayout Background="LightGray">
          <xctk:TextBox Text="First"
                        Margin="15,5"/>
          <xctk:TextBox Text="Second"
                        Margin="15,5"/>
          <xctk:Button Content="Check"
                       Margin="5"
                       HorizontalOptions="Center"/>
        </VerticalStackLayout>  
      </xctk:Expander.Content>
    </xctk:Expander>
    Inheritance Hierarchy

    System.Object
       Microsoft.Maui.Controls.BindableObject
          Microsoft.Maui.Controls.Element
             Microsoft.Maui.Controls.NavigableElement
                Microsoft.Maui.Controls.VisualElement
                   Microsoft.Maui.Controls.View
                      Microsoft.Maui.Controls.Compatibility.Layout
                         Microsoft.Maui.Controls.TemplatedView
                            Xceed.Maui.Toolkit.Control
                               Xceed.Maui.Toolkit.ContentControl
                                  Xceed.Maui.Toolkit.Expander

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also