Rakesh
Rakesh

Reputation: 15057

How to change the border object's property such as color in Windows Phone 7, once border object is created

I have a grid (table) like structure with rows and columns, and I am assigning the background color for every cell using the border object.

How do I change the background color for every cell of the grid?

This is my approach:

How can I change the background color for a particular table row?

Upvotes: 0

Views: 206

Answers (1)

Shahar Prish
Shahar Prish

Reputation: 4847

Now that I better understand your question...

The following code will give you the border in Row r and Column c.

var border = myGrid.Children.OfType<Border>().Where(x => Grid.GetRow(x) == r && Grid.GetColumn(x) == c).FirstOrDefault();
border.Background = [...];

Hope this helps.

Upvotes: 2

Related Questions