Accordion > Accordion Task-Based Help > Accordion Pane Content Area > Adding a Control to the Content Area |
At Design Time in Design view
To add a Button control to the content area, complete the following steps:
In XAML
To add a Button control to the content area in XAML, complete the following:
XAML |
Copy Code
|
---|---|
<Button Content="Button" Height="Auto" Width="Auto"/> |
In Code
To add a Button control to the content area in code, complete the following:
Visual Basic |
Copy Code
|
---|---|
'Create the Button control Dim NewButton As New Button() NewButton.Content = "Button" 'Set the Button Control's Width and Height properties NewButton.Width = Double.NaN NewButton.Height = Double.NaN 'Add the Button to the content area C1AccordionItem1.Content = (NewButton) |
C# |
Copy Code
|
---|---|
//Create the Button control Button NewButton = new Button(); NewButton.Content = "Button"; //Set the Button Control's Width and Height properties NewButton.Width = double.NaN; NewButton.Height = double.NaN; //Add the Button to the content area c1AccordionItem1.Content = (NewButton); |
This Topic Illustrates the Following:
When accordion pane is expanded, the button control will appear in its content area, resembling the following image: