Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drop Menu Item Style

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

    Drop Menu Item Style

    Hello,

    I am looking to improve an existing indicator, the Template Switcher. Currently, it can cycle through the templates one click at a time. A drop-down menu has been added in which the items in the drop-down update depending on the last drawn object or a selected object.

    The problem is the style. The drop down object uses the following as it's style.

    Code:
    Application.Current.TryFindResource("MainMenuItem") as Style;
    The drop down menus from other indicators have no fantom icon that pops up. When not setting the style, the fantom icon disappears (of course the other styling parameters are not set either). See the following photos.

    Click image for larger version

Name:	rlkJQ5O.png
Views:	259
Size:	76.5 KB
ID:	1215906
    Click image for larger version

Name:	Oh3gwNk.png
Views:	235
Size:	71.2 KB
ID:	1215907
    Click image for larger version

Name:	mdSnlRm.png
Views:	242
Size:	74.7 KB
ID:	1215908

    Any idea what's going on? I went back and forth checking to see if there is any difference between the code, but alas I cannot find any. Perhaps with a fresh set of eyes I will.

    Thanks
    Unsuitable
    NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

    #2
    Hello Unsuitable,

    You can make your own style or object.

    The DropMenu class in the SampleWPFModifications may give you some ideas.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,

      I'll take a look. However, not looking to make a new style, but rather keep in line with NT's styling. Thus pull from NT's "mainMenuItemStyle". The problem is for some reason the style is inconsistent for some reason. I don't know why there's a fantom icon. In the instances where I use "mainMenuItemStyle" for another indicator drop down menu, there is no phantom icon.
      Unsuitable
      NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

      Comment


        #4
        Hello Unsuitable,

        That's part of the style. I do not know of a way of modifying it.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello Chelsea,

          Not looking to modify it. The style is inconsistent. It's literally the same code. I must be missing something.



          Take a look at the code. Right hand side is one indicator and the left is another.

          Thank you
          Unsuitable
          NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

          Comment


            #6
            Hello Unsuitable,

            You are telling me to look at the line of code in post Home or you are telling me to look at the code in the SampleWPFModifications script?

            If the approach in the SampleWPFModifications script does not suit you, you will have come up with your own implementation.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello Chelsea,

              Perhaps the photo didn't up load correct

              Here's the link: https://i.imgur.com/x9aPuFn.png
              Unsuitable
              NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

              Comment


                #8

                Going to upload the photo directly. Links seem to not work consistency


                Click image for larger version

Name:	x9aPuFn.png
Views:	212
Size:	175.8 KB
ID:	1216911
                Unsuitable
                NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

                Comment


                  #9
                  Hello Unsuitable,

                  In the screenshots it appears you are using the MainMenuItem and SystemMenuStyle styles.

                  You could choose to create your own style instead. I'm not certain how one would modify the existing styles NinjaTrader created.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Hello Chelsea,

                    Again the indicator is meant to mimic NT's style. The problem is the style is not remaining consistent between indicators... but the code is the EXACT same. However, the output is not. Don't know how to be more clear.

                    With that said, using the indicators on a new build of NT8 resolves the mismatched styles. Have no clue why the older build is having consistency issues. So if somebody runs into this issue, try the newer builds of NT.

                    Best regards,

                    Unsuitable
                    Ocean Trading Indicators

                    Unsuitable
                    NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    571 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    330 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    101 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    549 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    549 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X