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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    593 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
    554 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X