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

Getting Resource Values for UI

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

    Getting Resource Values for UI

    Hi!

    Examples for SuperDom columns and Add-ons have some next strings

    Code:
    Application.Current.TryFindResource("BorderThinBrush") as Brush
    Application.Current.FindResource("immutableBrushVolumeColumnForeground") as SolidColorBrush
    Application.Current.FindResource("immutableBrushVolumeColumnBackground") as SolidColorBrush
    
    Application.Current.FindResource("brushVolumeColumnForeground") as SolidColorBrush
    Application.Current.FindResource("brushVolumeColumnForeground") as SolidColorBrush
    
    Application.Current.FindResource("brushPriceColumnForeground") as SolidColorBrush
    Application.Current.FindResource("brushPriceColumnForeground") as SolidColorBrush
    But there is no any information about these resources
    Application.Current.Resources doesn't contain these values, it doesn't contain anything except 6 values, not related to values above

    NinjaTrader.Custom.Resource.ResourceManager
    NinjaTrader.Gui.Resource.ResourceManager
    also don't have anything related

    Trying this from the stackoverflow also does not any effect to get these values

    How can I enumerate that resources and select values that I need?
    Is this dynamic resources and how can they be enumerated?

    Last edited by fut_practic; 12-28-2021, 05:09 AM.

    #2
    Hello fut_practic,

    These resource keys come from the skin files.

    You can find them skin xaml pages.

    Documents\NinjaTrader 8\templates\Skins\Light

    The SampleWPFModifications shows how to use these.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello fut_practic,

      These resource keys come from the skin files.

      You can find them skin xaml pages.

      Documents\NinjaTrader 8\templates\Skins\Light

      The SampleWPFModifications shows how to use these.
      https://ninjatrader.com/support/help...ui)-modifi.htm
      Yes, that's it! Thx

      But how can I detect what theme was applied by user? Just to account this information. How can be retrieved the name of the current theme applied?

      Comment


        #4
        Hello fut_practic,

        The keys will be the same for every skin, but the values will change.

        While this would be undocumented, and not fully supported, you may find the NinjaTrader.Core.Globals.GeneralOptions.Skin has what you need.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by inanazsocial, Today, 01:15 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by rocketman7, Today, 02:12 AM
        0 responses
        10 views
        0 likes
        Last Post rocketman7  
        Started by dustydbayer, Today, 01:59 AM
        0 responses
        1 view
        0 likes
        Last Post dustydbayer  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        5 responses
        23 views
        0 likes
        Last Post trilliantrader  
        Started by Davidtowleii, Today, 12:15 AM
        0 responses
        3 views
        0 likes
        Last Post Davidtowleii  
        Working...
        X