Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

button on a menu

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

    button on a menu

    Hello i have a menu i have added to the chart window at the top - right of all the ninjatrader menus ie chart trader etc.
    Within this i have added a series of NTMenuItem() elements.

    I want to also add a button to this menu - which button element do you recommend i add and which callback do i need to use to handle the button events ie click etc?
    Is there different styles that can be used or to position the button on the menu ? Or best to use standard styles provided via the TryFindResource function
    thanks

    #2
    Hello soulfx, thanks for your post.

    We have pre-made examples of modifying the existing WPF elements in NinjaTrader here, this includes a sample toolbar addition with buttons within:
    https://ninjatrader.com/support/foru...07#post1124507

    For styling, the only knowledge of styling that I have is through the default resources that we have defined using TryFindResource. You would need to research more on the topic of programmatic WPF styling through C# for more information.

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello soulfx,

      To add to ChrisL, the TryFindResource can be used as follows:
      Code:
      menu.Style = Application.Current.TryFindResource("SystemMenuStyle") as Style;
      The available resource strings can be found by going to (by default) "Documents/NinjaTrader8/templates/Skins/Dark/BluePrint.xaml". The resource string is the text in the x:Key field. At any one time, these resources are being used to add color to the NinjaTrader 8 menus. Only one skin is loaded in memory at a time so the x:Key fields are consistent throughout the default skins. The only element that changes from skin to skin is the color.

      Hope this helps!
      Unsuitable
      NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Rapine Heihei, Today, 08:19 PM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 08:25 PM
      0 responses
      3 views
      0 likes
      Last Post Rapine Heihei  
      Started by f.saeidi, Today, 08:01 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 07:51 PM
      0 responses
      6 views
      0 likes
      Last Post Rapine Heihei  
      Started by frslvr, 04-11-2024, 07:26 AM
      5 responses
      96 views
      1 like
      Last Post caryc123  
      Working...
      X