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 sjsj2732, Today, 04:31 AM
      0 responses
      20 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      280 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      279 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      130 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      90 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X