Question About Modifying the NinjaTrader Chart TabControl / Tab Layout

I am trying to determine whether the tab area in a NinjaTrader Chart window can be customized through supported NinjaTrader APIs or NinjaScript.

From inspecting the NinjaTrader assemblies, I found the following,

Chart inherits from NTWindow.
NTWindow.MainTabControl appears to be a standard WPF System.Windows.Controls.TabControl .
Chart.InitializeComponent() appears to have been generated by the WPF presentation/build system.
This suggests that the original Chart window layout/XAML may be compiled into NinjaTrader.Gui.dll` as a WPF resource rather than being available as a normal editable .xaml file.

My goal is specifically to modify the Chart window’s tab area, such as changing the location/layout of the chart tabs.

Could you please confirm:

Is modifying or repositioning MainTabControl in a Chart window supported?
Is there a supported NinjaScript/AddOn API for changing the Chart window’s tab layout?
Can an AddOn access and modify the existing MainTabControl at runtime using WPF?
Is the Chart XAML/layout intentionally internal, or is there a supported way to access or override it?
If direct modification is unsupported, is there a recommended way to create a custom Chart window or custom tab layout while retaining normal NinjaTrader chart functionality?

The supported boundary is narrower than the WPF type information suggests.

NinjaTrader documents two relevant paths:

  1. An AddOn can receive each open Chart in OnWindowCreated() and add or remove WPF controls at runtime. That is the supported pattern for buttons, menus, toolbars and Chart Trader additions. It also requires cleanup in OnWindowDestroyed().
  2. For a different tab layout, the documented path is a separate NTWindow with your own TabControl, NTTabPage types and TabControlManager settings.

What is not documented as a stable extension point is reparenting, replacing or repositioning the built-in Chart window’s MainTabControl. You can inspect the live visual tree and may be able to mutate it as ordinary WPF, but that depends on NinjaTrader’s internal template and layout. A platform update can change element ownership, names, styles or workspace restore behavior. I would treat that as unsupported and upgrade-fragile, even though the runtime object is accessible.

So the practical answer is:

  • Add controls around documented Chart grids when the normal Chart window must stay intact.
  • Build a custom NTWindow when control over tab placement matters more than retaining the exact built-in Chart shell.
  • Do not assume a custom NTWindow can host the native Chart tab with all built-in behavior. The public AddOn docs show custom NTTabPage content, not a supported way to transplant NinjaTrader’s internal Chart page.

The relevant official Help Guide pages are “Other Uses for an AddOn”, “NTWindow”, and “Creating Chart WPF (UI) Modifications from an Indicator”.

If the requirement is only tabs on another edge, I would ask NinjaTrader to confirm that exact MainTabControl mutation before building around it. If they do not confirm it, a separate AddOn window is the safer design.

I did extensive code search for this tab

chart/chart.baml
chart/charttab.baml
chart/charttrader.baml
chart/charttraderquantityupdown.baml
chart/databox.baml
chart/drawingtooleditor.baml

...
    <tools:TabControlManager.Factory>
        <c:ChartDXFactory />
    </tools:TabControlManager.Factory>
</TabControl>

however, the tab control is not exposed its hidden only ninja can make changes to it, so I was left with targeting the existing WPF Tab Control from an AddOn and modify its presentation at runtime, for chart PERFORANCE I normally like to do hard code so I won’t have that many addons on the chart, unless I’m missing something yet I wasn’t able to see the tab location code on its main hardcode , its hidden

That matches the boundary here. The BAML shows how NinjaTrader built the window, but it does not turn those elements into a supported API.

If you still test the runtime WPF route, I would keep it presentation-only. Make changes on the window Dispatcher, store the original Grid row, column and style values, and restore them in OnWindowDestroyed. I would not reparent the Chart tabs or replace the TabControlManager factory, because workspace restore and the tab lifecycle still belong to NinjaTrader.

A useful proof test is opening and closing several Chart windows, changing workspaces, duplicating a tab, then restarting NinjaTrader. If the layout survives all of that without orphaned tabs or exceptions, the experiment is internally consistent, but it is still version-sensitive. For production, I would ask NinjaTrader support to confirm the exact MainTabControl property you plan to touch before shipping it.

I proceeded and did an addon, works great but not defiantly the path I wanted to take,