tags:

views:

85

answers:

1

hey, I have Grid with 10 rows and 10 column, and I want in code behind get to every of this grid cell to change this background or add image to cell, How can I do it ?

+2  A: 

Grid, in WPF, doesn't really have "cells".

Instead, individual child controls of the grid are "decorated" with the Grid.Row and Grid.Column attached property.

If you want to change the color of a "cell", there will need to be some UIElement that is marked with that row and column, and is a child of the Grid. You can search the grid's Children for the specific control in that row and column (by using Grid.GetColumn(child), etc), then set the color of that UIelement.

Reed Copsey