• 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

How to set Theme for controls

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

    How to set Theme for controls

    When creating controls in an AddOn, it seems as though some controls pick up the theme automatically (like Button's), while others don't (ListView). Is there a standard way to pick up the current theme for NT8 AddOn's?

    #2
    Hello GrumpyTrader,

    Thank you for your post.

    You can use NinjaTrader.Core.Globals.GeneralOptions.Skin to find the Skin applied and then adjust your Add On based on the Skin chosen.

    Please let me know if you have any questions.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Hi Patrick,
      Are there defined resources for these variables that I can access in NinjaTrader.Gui.Tools or do I have to backward engineer them based on the skin?

      Comment


        #4
        Hello GrumpyTrader,

        Thank you for your response.

        You can review the files under Documents\NinjaTrader 8\templates\Skins for the different items that can be changed.
        You can also reference the Help Guide on Skins: http://ninjatrader.com/support/helpG...r_own_skin.htm
        However, there is no resource for definitions of each item in the Skins.

        Please let me know if you have any questions.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Hi Patrick
          I've been working on getting the styles synchronized in my VS AddOn Project. The goal is to import the skin resources into the project. The NinjaTraderAddOnProject example has the same issue I am running into where all the references in the XAML to the resources (such as Style="{StaticResource FontLabel}") can not be resolved in the project. I'm trying to figure out what the best way is to a) determine the skin used and b) load the correct resources in the DLL. Is it possible for someone on your side to fix the example so that the resources are resolved?

          Comment


            #6
            Hello GrumpyTrader,

            Thank you for your response.

            The resources in this case are local to NinjaTrader and would not be available in the project as you are building it. You could create your own place holder resources in your files while working in Visual Studio and then remove them before compiling.

            I would recommend to develop Add Ons without the XAML designer as the preview will not work properly and there is no means around this.

            Please let me know if you have any questions.
            Patrick H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by rudccv, Today, 08:42 PM
            0 responses
            3 views
            0 likes
            Last Post rudccv
            by rudccv
             
            Started by Newtrader101, Today, 03:54 PM
            1 response
            16 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by williamzz, Today, 03:28 PM
            0 responses
            7 views
            0 likes
            Last Post williamzz  
            Started by Robert87, Today, 11:07 AM
            0 responses
            14 views
            0 likes
            Last Post Robert87  
            Started by phta123, Today, 10:24 AM
            0 responses
            17 views
            0 likes
            Last Post phta123
            by phta123
             
            Working...
            X