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 MatthewLesko, 02-01-2021, 07:50 AM
      5 responses
      113 views
      0 likes
      Last Post marcus2300  
      Started by kabott, Today, 03:17 AM
      0 responses
      1 view
      0 likes
      Last Post kabott
      by kabott
       
      Started by azuul, Today, 01:49 AM
      1 response
      12 views
      0 likes
      Last Post azuul
      by azuul
       
      Started by rtwave, Yesterday, 11:52 PM
      0 responses
      3 views
      0 likes
      Last Post rtwave
      by rtwave
       
      Started by tgn55, Yesterday, 09:51 PM
      0 responses
      4 views
      0 likes
      Last Post tgn55
      by tgn55
       
      Working...
      X