The help file is missing the following in the code with the header above
Without a call to this, the button appears in all other tabs
chartWindow.MainTabControl.SelectionChanged += MySelectionChangedHandler;
private void MySelectionChangedHandler(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 NinjaTrader.Gui.Chart.ChartTab;
if (chartTab != null)
if (myButton != null)
myButton.Visibility = chartTab.ChartControl == ChartControl ? Visibility.Visible : Visibility.Collapsed;
}

Comment