Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Title Bar Menu Item Icon Color

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

    Title Bar Menu Item Icon Color

    I'm aware that the color of a custom menu item icon can be changed using:
    Code:
    Foreground = Brushes.Green
    Is there a way to change the color but also to keep the icon color changing slightly (highlighting) on mouse hover?

    #2
    Hello FatCanary,

    Thank you for your note.

    That would generally be done with WPF Styles.

    Here's a general example from this publicly available Stack Overflow link of what I mean by this:

    I want to change the background color of a button when IsMouseOver == True <Button Command="{Binding ClickRectangleColorCommand}" Background="{Binding Color, Converter={StaticResource


    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Thanks Kate.

      Where would I need to put the XAML code?

      Comment


        #4
        Hello FatCanary,

        Thank you for your reply.

        You can load XAML from a file that you'd want to put in the Addons folder along with the .cs file. AddOnFramework shows how to load XAML from a file, and SampleWPFModifications shows how you can grab some of the button styles NT uses.

        Please let us know if we may be of further assistance to you.
        Attached Files

        Comment


          #5
          Thanks for the information Kate.

          Comment


            #6
            Hi, you can also read this post to change the icon colour
            Title Bar Menu Item Icon Color

            This example demonstrates how do I change the text color of the menu item in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.

            Comment


              #7
              When using:
              Code:
              Application.Current.TryFindResource("MainMenuItem" ) as Style
              In what file is ''MainMenuItem" being searched for?
              My understanding is that it would be in BluePrint.xaml. However, I can't find it in that file.

              Comment


                #8
                Hello FatCanary,

                Thank you for your reply.

                Application.Current.TryFindResource("MainMenuItem" ) is looking for an internal resource to NinjaTrader, this would not be located in BluePrint.xaml.

                Here's some documentation from Microsoft that's publicly available on working with Styles with WPF:

                Learn about XAML resources in Windows Presentation Foundation (WPF) for .NET. Understand the types of XAML resources related to styles and themes.


                Please let us know if we may be of further assistance to you.

                Comment


                  #9
                  Thanks Kate, that is what I suspected.

                  As it is an internal resource, does that mean the MainMenuItem style cannot be modified by the user?

                  And, from what you said in an earlier post, I could create my own 'main menu item' style in a xaml file, and use that for custom menu icons?

                  Comment


                    #10
                    Hello FatCanary,

                    Thank you for your reply.

                    Correct, you can't modify that resource as it is internal.

                    You could certainly make your own menu item style in XAML, and load that like the example in Add-on Framework, yes.

                    Please let us know if we may be of further assistance to you.

                    Comment


                      #11
                      Lovely. Thanks for the confirmation.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by DannyP96, 05-18-2026, 02:38 PM
                      1 response
                      85 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by CarlTrading, 05-11-2026, 05:56 AM
                      0 responses
                      143 views
                      0 likes
                      Last Post CarlTrading  
                      Started by CarlTrading, 05-10-2026, 08:12 PM
                      0 responses
                      83 views
                      0 likes
                      Last Post CarlTrading  
                      Started by Hwop38, 05-04-2026, 07:02 PM
                      0 responses
                      256 views
                      0 likes
                      Last Post Hwop38
                      by Hwop38
                       
                      Started by Mindset, 04-21-2026, 06:46 AM
                      0 responses
                      334 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Working...
                      X