• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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.

    https://ninjatrader.com/support/help...b=chartcontrol




    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 dsxfcv, Today, 02:02 AM
          0 responses
          4 views
          0 likes
          Last Post dsxfcv
          by dsxfcv
           
          Started by FMtrader, Today, 01:57 AM
          0 responses
          8 views
          0 likes
          Last Post FMtrader  
          Started by Nat11, Yesterday, 04:30 AM
          1 response
          19 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by Option Whisperer, 12-07-2019, 11:50 AM
          2 responses
          13 views
          0 likes
          Last Post Option Whisperer  
          Started by TraderJim618, 12-07-2019, 01:20 PM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Working...
          X