Announcement

Collapse
No announcement yet.

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 nutmame1, Today, 08:26 PM
      0 responses
      8 views
      0 likes
      Last Post nutmame1  
      Started by dr0832, Today, 07:02 PM
      0 responses
      13 views
      0 likes
      Last Post dr0832
      by dr0832
       
      Started by mlurskint8, Today, 05:27 PM
      3 responses
      19 views
      0 likes
      Last Post NinjaTrader_ShawnB  
      Started by SteveTheCPA, Today, 04:54 PM
      0 responses
      10 views
      0 likes
      Last Post SteveTheCPA  
      Started by Unsuitable, Today, 02:42 PM
      2 responses
      14 views
      0 likes
      Last Post Unsuitable  
      Working...
      X