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 yertle, Today, 08:38 AM
      6 responses
      25 views
      0 likes
      Last Post ryjoga
      by ryjoga
       
      Started by algospoke, Yesterday, 06:40 PM
      2 responses
      24 views
      0 likes
      Last Post algospoke  
      Started by ghoul, Today, 06:02 PM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      46 views
      0 likes
      Last Post jeronymite  
      Started by Barry Milan, Yesterday, 10:35 PM
      7 responses
      23 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X