This question is locked. New answers and comments are not allowed.
A childwindow will popup for one second everytime when I change TabItem in my program. The issue is that two or more TabItems will hightlight and sometimes no TabItem will highlight.I add two screenshots in attachments.And I attach the .xaml and .xaml.cs files.
Waiting for your solution, Thanks.
The MainPage.xmal:
The MainPage.xaml.cs:
Waiting for your solution, Thanks.
The MainPage.xmal:
<UserControl x:Class="TabControlHightlight.MainPage" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> <Grid x:Name="LayoutRoot" Background="White"> <telerik:RadTabControl x:Name="tcDemo" SelectionChanged="tcDemo_SelectionChanged" Width="800" Height="500" ScrollMode="Item"> <telerik:RadTabItem Header="first" Width="80" Height="30"/> <telerik:RadTabItem Header="second" Width="80" Height="30"/> <telerik:RadTabItem Header="third" Width="80" Height="30"/> <telerik:RadTabItem Header="fouth" Width="80" Height="30"/> <telerik:RadTabItem Header="fifth" Width="80" Height="30"/> <telerik:RadTabItem Header="sixth" Width="80" Height="30"/> <telerik:RadTabItem Header="seventh" Width="80" Height="30"/> <telerik:RadTabItem Header="eight" Width="80" Height="30"/> <telerik:RadTabItem Header="ninth" Width="80" Height="30"/> <telerik:RadTabItem Header="tenth" Width="80" Height="30"/> </telerik:RadTabControl> </Grid></UserControl>The MainPage.xaml.cs:
using System;using System.Windows;using System.Windows.Controls;using System.Windows.Threading;namespace TabControlHightlight{ public partial class MainPage : UserControl { ChildWindow cw; public MainPage() { InitializeComponent(); cw = new ChildWindow() { Width = 200, Height = 100 }; } private void tcDemo_SelectionChanged(object sender, RoutedEventArgs e) { cw.Show(); DispatcherTimer timer = new DispatcherTimer(); timer.Tick += new EventHandler(timer_Tick); timer.Interval = new TimeSpan(0, 0, 1); timer.Start(); } void timer_Tick(object sender, EventArgs e) { cw.Close();
timer.Stop();
} }}