TabItemValidation Support in WPF TabControl (TabControlExt)
TabItem now allows you cancel the selection of a tab item by setting e.Cancel=true in SelectedItemChangedEvent delegate.
The following code illustrates the same.
<syncfusion:TabControlExt SelectedItemChangedEvent="SelectedItemChanged" >
<Grid syncfusion:TabControlExt.Header="Tab1" />
<Grid syncfusion:TabControlExt.Header="Tab2" />
<Grid syncfusion:TabControlExt.Header="Tab3" />
</syncfusion:TabControlExt>
private void SelectedItemChangedEvent(object sender,SelectedItemChangedEventArgs e)
{
if(e.NewSelectedItem.Header.ToString()=="Tab2")
{
e.Cancel=true;
}
}
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page