Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 - How to add additional toolbars/panels?

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

    NT8 - How to add additional toolbars/panels?

    After several hours of experimenting with System.Windows.Controls, using DockPanels, Grids etc etc I haven't found a satisfactory way of producing:

    1. An additional toolbar that integrates nicely and properly with the UI.
    2. A panel to the right of the chart similar to the Chart Trader.

    I've looked at a few examples from NT7, one such being ToolbarShortcutV1 from the NT forums. It is quite simple to make a new toolstrip in NT7 using Windows Forms:

    Code:
      
                     ts = new ToolStrip();
                     ts.Name = "ts";             
                     ts.Dock = DockStyle.Left;
                     //.........etc etc etc
    Now that we are steering away from Windows Forms and into WPF, what is the best starting point you could recommend to do the above?

    I suspect that the NT8 chart window is made up of a series of Canvas, DockPanels within WPF, so I would like an idea please as to how the chart window is constructed as such.

    I had a look at the skins files but could not see a way to modify the existing code to make an extra toolbar.

    Would you mind sharing some useful methods for accessing NT8's chart windows, menus, toolbars etc. ?

    I really want to do this as I have several buttons I won't have room for on the top main toolstrip.

    Thank you,

    Sim22.
    Attached Files

    #2
    Hello,

    Thank you for the question.

    WPF is quite a bit different that WindowsForms so with that in mind I would suggest using google to review some general WPF concepts and examples or create a testing WPF application in visual studio to better understand what controls are used now.

    There are quite a few user and support provided samples for NT8 on the forum currently, most items like this will be exclusively on the forum at this point.

    You could see this thread; http://ninjatrader.com/support/forum...t=74225&page=4

    Or specifically this post for a sample of adding to the existing toolbar to get an idea of what is different: http://ninjatrader.com/support/forum...7&postcount=21

    Because NT8 is multi threaded you will also need to become familiar with invoking and dispatching which is demonstrated in the script.

    I would first suggest reviewing the process to add existing items into the existing toolbar so you can see that working as an example to learn from.

    Following that I would suggest looking into Microsofts Inspect tool if you plan on creating your own panels/toolbars etc, this tool helps in displaying the visual tree or the structure of the controls in the window. If you want to know what a window is made of, this would be the tool to use. This would assist in inserting your controls correctly so they are in a valid location to be displayed. https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse,

      I originally posted this question here:

      ninjatrader.com/support/forum/showthread.php?p=436848

      However I did not receive a reply. Chelsea replied eventually, letting me know she was working on a solution.

      Thanks for your comments. I shall have a look at the Inspect Tool. The multi-threading I shall have to understand more too.....so cheers for that.

      Simon.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by pilotfo, Today, 12:50 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by DTSSTS, Today, 11:35 AM
      2 responses
      11 views
      0 likes
      Last Post DTSSTS
      by DTSSTS
       
      Started by sinpeople, Today, 07:20 AM
      2 responses
      9 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Frank1000, Today, 03:05 AM
      5 responses
      16 views
      0 likes
      Last Post Frank1000  
      Started by fscabrera03, Yesterday, 01:18 PM
      2 responses
      26 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X