Adding a Control to the Content Panel

The C1Expander control will accept one child control in its content panel. In this topic, you will add learn how to add a WPF button control in the Properties window, in XAML, and in code.

At Design Time

To add a control to the content panel, complete the following steps:

1.   Click the C1Expander control once to select it.

2.   In the Toolbox, double-click the Button icon to add a Button control the content panel of the C1Expander control.

3.   Run the program and then expand the C1Expander control.

In XAML

To add a button control to the C1Expander control's content panel in XAML, complete the following steps:

1.   Place the following markup between the <c1ext:C1Expander> and </c1ext:C1Expander> tags:

 

<Button Content="Button" Height="Auto" Width="Auto"/>

 

2.   Run the program and then expand the C1Expander control.

In Code

To add a button control to the C1Expander control's content panel in code, complete the following:

1.   Enter Code view and add the following code beneath the InitializeComponent() method:

      Visual Basic

      C#

2.   Run the program and then expand the C1Expander control.

 This Topic Illustrates the Following:

When the C1Expander control is expanded, the button control appears in its content panel and  resembles the following image:

 


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.