Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Refreshing Silverlight canvas
1 replies. Latest Post by johnnystock on May 13, 2008.
(0)
onok44
Member
23 points
17 Posts
05-13-2008 10:36 AM |
Hello all,
I have two images and I’m attempting to make them appear to be blinking by hiding and show their visibility property. I have attempted to do this in Expressions blend but each time I set a keyframe would not recognize that I change the visibility property. My next attempt was the code below:
while (cnt != 5)
{
if (cnt % 2==0)
keyboard_clear.Visibility = Visibility.Visible;
keyboard_enter.Visibility = Visibility.Collapsed;
cnt++;
Thread.Sleep(1000);
}
Unfortunately the loop works, but it will not change the visibility of the images as it toggles through the loop. Can anyone help me?
johnnystock
Contributor
2295 points
362 Posts
05-13-2008 10:42 AM |
Unless I'm missing something, it looks to me like you are missing half of your blink. I would add an else that sets the visibility on those images to the opposite value and still increments cnt and performs the .sleep.