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

Events

This article lists the events specific for the TabControl.

The DropDownOpened event is raised when the drag drop menu of the control is opened. The event arguments are of type DropDownEventArgs.

The DropDownClosed event is raised when the drag drop menu of the control is closed. The event arguments are of type DropDownEventArgs.

DropDownOpened event handler

private void RadTabControl_DropDownOpened(object sender, DropDownEventArgs e) 
{ 
} 
The ItemReordered event is raised when an item is reordered while dragging. In order for this event to be raised, the AllowDragReorder property needs to be set to true. The event arguments are of type ItemReorderedEventArgs.

ItemReordered event handler

private void tabControl_ItemReordered(object sender, Telerik.UI.Xaml.Controls.TabControl.ItemReorderedEventArgs e) 
{ 
} 

Tab Close Events

TabControl comes with several events related to its tab (closing)/devtools/winui/controls/radtabcontrol/pinandclose functionality.

The PreviewTabClosed event is raised when a tab item is about to be closed. The event arguments are of type PreviewTabChangedEventArgs.

PreviewTabClosed event handler

private void tabControl_PreviewTabClosed(object sender, Telerik.UI.Xaml.Controls.PreviewTabChangedEventArgs e) 
{ 
} 

The TabClosed event is raised when a tab item is closed. The event arguments are of type TabChangedEventArgs.

TabClosed event handler

private void tabControl_PreviewTabClosed(object sender, Telerik.UI.Xaml.Controls.TabChangedEventArgs e) 
{ 
} 

Pin Tab Events

TabControl comes with several events related to its tab (pin/unpin)/devtools/winui/controls/radtabcontrol/pinandclose functionality.

The PreviewTabPinned event is raised when a tab item is about to be pinned. The event arguments are of type PreviewTabChangedEventArgs.

PreviewTabPinned event handler

private void tabControl_PreviewTabPinned(object sender, Telerik.UI.Xaml.Controls.TabChangedEventArgs e) 
{ 
} 
The TabPinned event is raised when a tab item is pinned. The event arguments are of type TabChangedEventArgs.

TabPinned event handler

private void tabControl_TabPinned(object sender, Telerik.UI.Xaml.Controls.TabChangedEventArgs e) 
{ 
} 
The PreviewTabUnpinned event is raised when a tab item is about to be unpinned. The event arguments are of type PreviewTabChangedEventArgs.

PreviewTabUnpinned event handler

private void tabControl_PreviewTabUnpinned(object sender, Telerik.UI.Xaml.Controls.TabChangedEventArgs e) 
{ 
} 
The TabUnpinned event is raised when a tab item is unpinned. The event arguments are of type TabChangedEventArgs.

TabUnpinned event handler

private void tabControl_TabUnpinned(object sender, Telerik.UI.Xaml.Controls.TabChangedEventArgs e) 
{ 
} 

Selection Events

TabControl provides two events in regards to its selection: PreviewSelectionChanged and SelectionChanged.

Handling the PreviewSelectionChanged Event

private void RadTabControl_PreviewSelectionChanged(object sender, Telerik.UI.Xaml.Controls.RadSelectionChangedEventArgs e) 
{ 
    // this will cancel the selection 
    e.Handled = true; 
} 
The SelectionChanged event is raised after the selection has already completed.

Implementing SelectionChanged event handler

private void radTabControl_SelectionChanged( System.Object sender, Telerik.UI.Xaml.Controls.RadSelectionChangedEventArgs e ) 
{ 
} 

See Also

In this article
Not finding the help you need?