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 fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,403 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        95 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        7 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X