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

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.

    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.

        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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            4 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Started by alifarahani, Today, 09:40 AM
            6 responses
            40 views
            0 likes
            Last Post alifarahani  
            Started by Waxavi, Today, 02:10 AM
            1 response
            19 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Working...
            X