• 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

WindowsFormsHost not visible in NTTabPage

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

    WindowsFormsHost not visible in NTTabPage

    Hi there,

    I used to work with WindowsFormsHost (in WindowsFormsIntegration.dll) to host indispensable Windows Forms controls in WPF applications.
    Works great in other WPF applications but not with NTTabPage of the demo NinjaTraderAddOnProject as the hosted control is 'alive' but not visible on a NTTabPage.

    I've added these references to my add-on:
    - System.Windows.Forms
    - WindowsFormsIntegration

    Here's the complete code of AddOnPage.xaml to host a MaskedTextBox:

    <t:NTTabPage x:Class="NinjaTraderAddOnProject.AddOnPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:t="clr-namespace:NinjaTrader.Gui.Tools;assembly=NinjaTrad er.Gui"
    xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Win dows.Forms">
    <Grid>
    <WindowsFormsHost Width="200" Height="200">
    <wf:MaskedTextBox x:Name="mtbDate" Mask="00/00/0000"/>
    </WindowsFormsHost>
    </Grid>
    </t:NTTabPage>

    Any ideas why nothing is visible in NT?
    Many thanks for any assistance or tips!!!
    Last edited by ruppschtaler; 02-28-2017, 09:25 AM.

    #2
    Hello ruppschtaler,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    Do you have the full project you can attach to your response or send over to us? Our email is platformsupport[at]ninjatrader[dot]com, please send the file with 'ATTN: Patrick H' in the subject line and reference this thread.

    Have you looked into the our updated Add On example at the following link?https://ninjatrader.com/support/help...t_overview.htm

    I look forward to your response.
    Patrick H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by TraderCAD, Today, 04:27 PM
    1 response
    5 views
    0 likes
    Last Post TraderCAD  
    Started by DavidHP, Today, 04:11 PM
    0 responses
    1 view
    0 likes
    Last Post DavidHP
    by DavidHP
     
    Started by alexstox, 03-24-2019, 01:07 PM
    6 responses
    57 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by fredfred, Today, 11:29 AM
    3 responses
    12 views
    0 likes
    Last Post NinjaTrader_JoshG  
    Started by swcooke, Today, 10:38 AM
    3 responses
    12 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X