Sunday, 25 August 2013

How to Refresh Canvas in windows phone silverlight?

How to Refresh Canvas in windows phone silverlight?

I want to refresh canvas in windows phone, I already had write code to
remove the element of array when user touch the line, now I want to remove
the line, for that I had used array, but the problem is the Line is not
erasing, I think the code I have written is right, but the problem is I am
not getting function in Silverlight or C#, which refresh the canvas, like
as in android or Java,
public void checkIntersection()
{
for (int i = 0; i < gameData.Count(); i++)
{
for (int j = 0; j < gameData.ElementAt(i).Path.Count(); j++)
{
if (gameData.ElementAt(i).Path.Contains(new
Point(selectedRow, selectedCol)))
{
int index = gameData.ElementAt(i).Path.IndexOf(new
Point(selectedRow, selectedCol));
while (gameData.ElementAt(i).Path.Count() > index)
{
gameData.ElementAt(i).Path.RemoveAt(gameData.ElementAt(i).Path.Count()
- 1);
}
return;
}
}
}
drawPath();
}

No comments:

Post a Comment