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

Skin and NT8 System colors

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

    Skin and NT8 System colors

    How do I get access to the many NT8 system colors used,

    for example color of a buy button, background color of OrderEntry for real and simulated trading, etc...


    Thank you
    Andreas

    #2
    Hello,

    Thank you for the question.

    I wanted to confirm, are you only trying to get specific colors or are you trying to style other controls similar to the native NinjaTrader controls?

    You can retrieve Colors, SolidColorBrushes and other information from the skin resources, it would depend on what specifically you are trying to retrieve.

    For a SolidColorBrush, you could instead use the following Brush on the style you want to retrieve.

    Code:
    SolidColorBrush someBrush = Application.Current.TryFindResource("SomResourceName") as SolidColorBrush;
    For a Color, it would be:

    Code:
    Color someBrush = Application.Current.TryFindResource("SomResourceName") as Color
    There are also specific color properties depending on the control you are trying to access, for example the ChartControl has a Propeties object which contains the common chart properties/colors.






    The style of other controls can be acquired as well, a menu item can be retrieved using the following syntax.

    Code:
    Application.Current.TryFindResource("MainMenuItem") as Style
    You can find all of the used resource names in the blueprint.xml file for each skin. We have a short guide on editing skins here: https://ninjatrader.com/support/help...hlightsub=skin




    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I just want to create my own SpreadTrader control (see old NT7 version here http://zweisteintrading.eu/spreadtrader.htm )

      and replicate the colors that are currently used in NT8. Interested in the Long / Short Button colors etc...

      I will give your approach a try. My Window will be wpf xaml based, will report in the next days

      Andreas

      Comment


        #4
        blueprint.xaml etc,, Basic Entry background color

        Hello,

        I can find several Color and Brush definitions in blueprint.xaml , orderentry.xaml .. etc.

        But I am missing a defintion for the background color for a BasicEntry window!

        This color will change according to account simulated or real.

        Could you indicate the Resources you use for the 2 states of the Background color?

        Thank you

        Andreas

        Comment


          #5
          Hello,

          Thank you for the reply.

          The Simulation color is a special brush that is set in the options menu, this is not going to be controlled with the skin specifically.

          You can instead reference this property using the following syntax:

          Code:
          NinjaTrader.Core.Globals.TradingOptions.SimulationColor
          As far as knowing the State of the tool, you could check if Global Simulation is enabled or not:

          Code:
          bool isEnabled = NinjaTrader.Core.Globals.TradingOptions.IsGlobalSimulationMode;


          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by funk10101, Today, 12:02 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by GLFX005, Today, 03:23 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by nandhumca, Yesterday, 03:41 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by The_Sec, Yesterday, 03:37 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by vecnopus, Today, 06:15 AM
          0 responses
          1 view
          0 likes
          Last Post vecnopus  
          Working...
          X