Adding a Control to the Header Bar

The C1Expander control's header bar is able to accept a WPF control. In this topic, you will add a Button control to the header bar in XAML and in code.

In XAML

To add a Button control to the header bar in XAML, place the following XAML markup between the <c1ext:C1Expander> and </c1ext:C1Expander> tags:

<c1ext:C1Expander.Header>

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

</c1ext:C1Expander.Header>

In Code

To add a Button control to the header bar in code, complete the following steps:

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

      Visual Basic

      C#

2.   Run the program.

 This Topic Illustrates the Following:

As a result of this topic, a Button control will appear in the header. The final result will resemble the following image:

 


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