Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

R G B components of a Brush in NT8?

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

    R G B components of a Brush in NT8?

    How can I get the R G B components of a Brush in NT8?

    #2
    Hello afshinmoshrefi,

    Are you trying to find the RGB values of an existing brush?
    You could get this by casting the System.Windows.Media.Brush as a System.Windows.Media.SolidColorBrush.
    Brush aBrush = Brushes.Honeydew;
    SolidColorBrush sBrush = aBrush as SolidColorBrush;
    Print(string.Format("{0} | R: {1}, G: {2}, B: {3}, A: {4}", aBrush.ToString(), sBrush.Color.R, sBrush.Color.G, sBrush.Color.B, sBrush.Color.A));

    Or are you trying to create a brush using RGB values?
    MyBrush = new SolidColorBrush(Color.FromArgb(100, 56, 120, 153));
    myBrush.Freeze();
    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,406 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by Shai Samuel, 07-02-2022, 02:46 PM
    4 responses
    98 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by DJ888, Yesterday, 10:57 PM
    0 responses
    8 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    160 views
    0 likes
    Last Post loganjarosz123  
    Started by Belfortbucks, Yesterday, 09:29 PM
    0 responses
    9 views
    0 likes
    Last Post Belfortbucks  
    Working...
    X