Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
R G B components of a Brush in NT8?
Collapse
X
-
Tags: None
-
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
- Likes 1
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,221 views
0 likes
|
Last Post Today, 08:07 PM | ||
Started by andrewtrades, Today, 04:57 PM
|
1 response
10 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
6 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
9 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
Comment