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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    63 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    91 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    48 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    105 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    63 views
    0 likes
    Last Post PaulMohn  
    Working...
    X