Foreground = Brushes.Green
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!
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
NinjaTrader
Title Bar Menu Item Icon Color
Collapse
X
-
Title Bar Menu Item Icon Color
I'm aware that the color of a custom menu item icon can be changed using:
Code:Tags: None
-
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.Kate W.NinjaTrader Customer Service
-
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.Kate W.NinjaTrader Customer Service
Comment
-
Hi, you can also read this post to change the icon colour
Title Bar Menu Item Icon Color
How to change the text color of Menu item in Android - 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.Step 2 − Add the following code to res/layout/activity_main.xml.
Comment
-
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 Framework. Understand the types of XAML resources related to styles and themes.
Please let us know if we may be of further assistance to you.Kate W.NinjaTrader Customer Service
Comment
-
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
-
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.Kate W.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kujista, Today, 05:44 AM
|
2 responses
12 views
0 likes
|
Last Post
by kujista
Today, 08:24 AM
|
||
Started by trilliantrader, Today, 08:16 AM
|
0 responses
3 views
0 likes
|
Last Post Today, 08:16 AM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
9 responses
175 views
0 likes
|
Last Post Today, 08:14 AM | ||
Started by funk10101, Today, 08:14 AM
|
0 responses
2 views
0 likes
|
Last Post
by funk10101
Today, 08:14 AM
|
||
Started by adeelshahzad, Today, 03:54 AM
|
1 response
13 views
0 likes
|
Last Post Today, 08:12 AM |
Comment