• 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, 08: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 tvaughan4, 12-13-2019, 10:46 PM
    2 responses
    14 views
    0 likes
    Last Post tvaughan4  
    Started by digibob, 12-13-2019, 10:01 PM
    3 responses
    12 views
    0 likes
    Last Post digibob
    by digibob
     
    Started by ldissinger, Yesterday, 12:55 PM
    1 response
    14 views
    0 likes
    Last Post ldissinger  
    Started by pstrusi, Yesterday, 09:06 AM
    1 response
    26 views
    0 likes
    Last Post marcus2300  
    Started by vpzdcv, Yesterday, 02:31 AM
    0 responses
    13 views
    0 likes
    Last Post vpzdcv
    by vpzdcv
     
    Working...
    X