private bool TabSelected()
{
bool tabSelected = false;
// loop through each tab and see if the tab this indicator is added to is the selected item
foreach (System.Windows.Controls.TabItem tab in chartWindow.MainTabControl.Items)
if ((tab.Content as Gui.Chart.ChartTab).ChartControl == ChartControl && tab == chartWindow.MainTabControl.SelectedItem)
tabSelected = true;
return tabSelected;
}
private void TabChangedHandler(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
if (e.AddedItems.Count <= 0)
return;
tabItem = e.AddedItems[0] as System.Windows.Controls.TabItem;
if (tabItem == null)
return;
chartTab = tabItem.Content as Gui.Chart.ChartTab;
if (chartTab == null)
return;
if (TabSelected())
{
//RemoveWPFControls();
InsertWPFControls();
}
else
{
RemoveWPFControls();
}
}
is there a way to apply the same indicator to multiple tabs and have them function with the data for the seperate tabs?

Comment