Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using BitmapImage objects with Buttons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using BitmapImage objects with Buttons

    FYI
    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;
    }


    #2
    Hello ​Mindset ​,

    Thank you for reaching out.

    Is the file you are working with, a script coded by yourself, or was it acquired from a 3rd party?

    If it is your own coded or you are trying to modify NinjaTrader files, please contact our engineering team at

    [email protected]

    and they will be able to guide you in this regard.

    If it is a 3rd party file, you would want to contact the developer for assistance with their software.

    Please let us know if you have any other questions.​
    Erick P.NinjaTrader Customer Service

    Comment


      #3
      I copied it straight from the help file.
      Just thought you should know that as is - it does not work correctly.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      152 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      305 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      244 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      345 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      176 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X