title | description | type | page_title | slug | position | tags | ticketid | res_type |
---|---|---|---|---|---|---|---|---|
Add additional element inside RadTabbedWindow's header |
This article demonstrates how to add additional element inside RadTabbedWindow's header. |
how-to |
How to add additional element inside RadTabbedWindow's header |
kb-add-additional-element-inside-radtabbedwindows-header |
0 |
tabbedwindow, element, header |
1444813 |
kb |
Product Version | 2019.3.1023 |
Product | RadTabbedWindow for WPF |
How to add additional element inside RadTabbedWindow's header.
To achieve this requirement, you can subscribe to the Loaded event of RadTabbedWindow. Inside the event handler, you can get the StackPanel that holds the header buttons. Then, you can insert new buttons on the panel.
{{region cs-kb-add-additional-element-inside-radtabbedwindows-header-1}}
private void RadTabbedWindow_Loaded(object sender, RoutedEventArgs e)
{
var stackWithButtons = this.ChildrenOfType<StackPanel>().FirstOrDefault( x=> x.Name == "HeaderButtons");
if (stackWithButtons != null)
{
stackWithButtons.Children.Insert(0, new RadButton() { Content = "My Custom Button" });
}
}
{{endregion}}