• 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

Style for SubMenuItem

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

  • ruppschtaler
    started a topic Style for SubMenuItem

    Style for SubMenuItem

    Hi there,

    I need a menu similar to NT's Chart Trader menu in my Add-On.
    Seems to work - except the missing headers in the sub menu items. (see attached screenshot).
    I think I have to use a different style for the sub menu items and tried many menu item styles of NT's resources but nothing found so far.

    Here's my current code:

    Menu myMenu = new Menu();
    myMenu.Style = Application.Current.TryFindResource("SystemMenuSty le") as Style;
    MainMenu.Add(myMenu);

    MenuItemChartTrader = new NTMenuItem()
    {
    Foreground = Brushes.Black,
    Height = 20,
    Icon = Icons.ChartTraderOpen,
    Style = Application.Current.TryFindResource("MainMenuItem" ) as Style,
    VerticalAlignment = VerticalAlignment.Center,
    VerticalContentAlignment = VerticalAlignment.Center,
    ToolTip = "Chart Trader",
    Width = 25
    };
    myMenu.Items.Add(MenuItemChartTrader);

    MenuItemChartTrader_Closed = new NTMenuItem()
    {
    Foreground = Brushes.Black,
    Header = "Closed",
    Height = 20,
    Icon = Icons.ChartTraderClosed,
    Style = Application.Current.TryFindResource("MainMenuItem" ) as Style,
    VerticalAlignment = VerticalAlignment.Center,
    VerticalContentAlignment = VerticalAlignment.Center,
    Width = 22
    };
    MenuItemChartTrader.Items.Add(MenuItemChartTrader_ Closed);

    Thanks in advance!
    Attached Files

  • NinjaTrader_ChelseaB
    replied
    Hello ruppschtaler,

    Try using InstrumentMenuItem as the resource name.

    Below is a link to an example called ChartToolBarCustomMenuExample_NT8 that uses this.
    https://ninjatrader.com/support/foru...327#post499327

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by NT-Roland, Today, 04:36 PM
0 responses
1 view
0 likes
Last Post NT-Roland  
Started by Newtrader101, Today, 03:40 PM
2 responses
10 views
0 likes
Last Post Newtrader101  
Started by Branpo, Today, 02:58 PM
2 responses
5 views
0 likes
Last Post Branpo
by Branpo
 
Started by sdauteuil, Today, 02:09 PM
1 response
8 views
0 likes
Last Post NinjaTrader_Jesse  
Started by AMATX, Today, 02:19 PM
2 responses
10 views
0 likes
Last Post AMATX
by AMATX
 
Working...
X