Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        598 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X