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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        43 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        30 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        47 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Working...
        X