• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 Tinacaro, Yesterday, 11:52 PM
        0 responses
        4 views
        0 likes
        Last Post Tinacaro  
        Started by dierezer, Yesterday, 11:38 PM
        0 responses
        4 views
        0 likes
        Last Post dierezer  
        Started by hbustami, Yesterday, 11:35 PM
        1 response
        15 views
        0 likes
        Last Post hbustami  
        Started by bmccoard, Yesterday, 06:48 PM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_ChrisSch  
        Started by Sorcerysoft, Yesterday, 10:32 PM
        0 responses
        8 views
        0 likes
        Last Post Sorcerysoft  
        Working...
        X