Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Control Center Menu Item with Icon

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

    Control Center Menu Item with Icon

    Hi,
    I added a new menu item to the Control Center toolbar. Now I would like to set an icon, similar to the "new", "tools", "workspaces" icons.
    I tried it some different ways, but without any succes. See below what Ive already tried
    How can I add an Icon?


    new NTMenuItem {
    Icon = BitmapImage,
    Icon = ImageBrush,
    Icon = "test.png",
    Icon = "C:/.../test.png",
    }

    Thanks!

    #2
    Hello Bobin,

    Thank you for your post.

    This post explains using a Path Geometry object to try to set the Icon property:

    https://ninjatrader.com/support/foru...86#post1156386

    An example of using a PNG file in a Menu or Button can be found in the SampleWPFModifications example script.
    https://ninjatrader.com/support/foru...07#post1124507

    Edit: Just want to clarify here, SampleWPFModiciations has an example for loading a PNG file as a bitmap image to be used on a Button control so it can be used similarly to a NTMenuItem, a little different than path geometry.

    Please let us know if we may be of further assistance to you.
    Last edited by NinjaTrader_Kate; 11-12-2021, 02:24 PM.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rocketman7, Today, 09:41 AM
    4 responses
    15 views
    0 likes
    Last Post rocketman7  
    Started by selu72, Today, 02:01 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by WHICKED, Today, 02:02 PM
    2 responses
    13 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by f.saeidi, Today, 12:14 PM
    8 responses
    21 views
    0 likes
    Last Post f.saeidi  
    Started by Mikey_, 03-23-2024, 05:59 PM
    3 responses
    56 views
    0 likes
    Last Post Sam2515
    by Sam2515
     
    Working...
    X