Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

array of brushes?

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

    array of brushes?

    I need to create a 3 x 3 array of brush colors but can't figure out how to create the array. I have successfully created other arrays like
    • private double[,] scoreArray = new double[3, arrayLength]; // array to hold filter priorities
    but cant figure out how to create a color/brushes array. The color for my plot will depend on the 2 indexes of the array.

    so I need something like
    • private Brush[,] plotColor = new Brush[3,3] {{Brush.DarkGreen, Brush.DarkGrey, Brush.DarkRed}, {Brush.Green, Brush.Gray, Brush.Red}, {Brush.LightGreen, Brush.LightGray, Brush.LightRed}};
    any help is appreciated
    thanks

    #2
    found it

    private SolidColorBrush[,] colorArray = new SolidColorBrush[3, 3];

    big thanks to error messages from the compiler

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    35 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    12 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    18 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X