Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ChartControl.Controls in NT8

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

    ChartControl.Controls in NT8

    what is equivalent of
    ChartControl.Controls in NT8 ?

    #2
    Hello TazoTodua,

    Thank you for the post.

    There is not an equivalent, NT8 now uses WPF for its window framework. What specifically are you trying to do with the Controls collection? There are many UI samples on the forum for NT8, depending on what you are trying to accomplish I may be able point to a resource.

    I look forward to being of further assistance.

    Comment


      #3
      I am trying to convert Nt7 code into nt8.
      in NT7, there was codes like this:


      if (!ChartControl.Controls.Contains(panel))
      ChartControl.Controls.Add(panel);


      in NT8 i know of UserControlCollections.. but is that correct equivalent?

      Comment


        #4
        Hello TazoTodua,

        Thank you for the extra details.

        Yes that type of use would not really have an equivalent, WPF and WindowsForms work fairly differently.

        For further clarification NT8 has two levels of UI controls you can used, both are WPF.
        1. UserControlCollection is a simple collection which allows a script to place UI elements from WPF on the chart panel, this is very specific as it resides in the chart panel only.
        2. Standard WPF, these techniques can be used to append/modify existing windows or controls, this is the equivalent to what you are doing in 7 and what we will continue with.

        For examples similar to what you may be doing in 7 such as modifying windows or adding controls:
        Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've


        The link has a few examples, these utilize the automation id's to find controls to avoid looping logic. Automation ids are important in NT8 as that allows you to pinpoint a control like the chart trader account selector. I previously posted about finding automation ids, you can learn more about this and using Microsofts tool inspect in the following link: https://ninjatrader.com/support/foru...gy?postcount=7

        Before converting your item I highly suggest going through some of the UI samples and making sure you understand how the script is modifying or accessing controls. The syntax such as the dispatchers and invokes are absolutely necessary and it is important to keep the concepts shown in those samples. I suggest to just compare what you are doing in 7 and then locate a new way to accomplish that goal with the WPF framework as there are not likely direct equivalents in most cases here.

        I look forward to being of further assistance.

        Comment


          #5
          Jesse, thanks for outstanding answer, as always from you!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          563 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          329 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          547 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X