New to Telerik UI for WPF? Download free 30-day trial

Add additional element inside RadTabbedWindow's header

Environment

Product Version 2019.3.1023
Product RadTabbedWindow for WPF

Description

How to add additional element inside RadTabbedWindow's header.

Solution

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.

Example 1: Subscribe to the ContextMenuOpening event

    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" }); 
        } 
    } 
In this article
Not finding the help you need? Improve this article