The reason why my Make text appear and disappear in Silverlight 2 didn't work anymore after some Silverlight updates is because I used the Mouse Down event on the button. After the update the correct way of making a button work is the Click event. The Mouse Down event works with shapes and other objects such as this rectangle:

Update 2009-01-07: After grahamws' comment I have added to the button and the rectangle animations a text affected by the Visibility property. In its normal state it's Collapsed and it is set at Visible in a 2 second timeline. This to show that now in Silverlight 2 Release the Visibility property works fine unlike at the time when I played with it in a previous Silverlight version.

You can see all the code in my comment from 2009/01/07.

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


I know, I know, I've been neglecting this blog but I have the perfect excuse: I was very busy creating my very first Silverlight Game. Actually my first game ever. I teamed up with APIjunkie (the guy is a GENIUS) that after this experience I consider my BFFUFN.
I have learned a lot about Silverlight 2 and Expression Blend and I CAN wait to share the knowledge so I'm taking a little vaycayshonne first.
The name is Bumble Beegger and it's published on http://www.mashooo.com. Go check it out and don't be shy to criticize.

 

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

I have been asked how I did to insert my Silverlight apps in a blog entry. Simply enough it's just a matter of downloading the Silverlight extension and adding to your entry's code the path of your Silverlight app's .xap file.

I stumbled upon this wonderful find at Sean Blakemore's website that has a very becoming domain name: flawlesscode.com

There you will find further details on this plugin.

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

On my previous post I showed an option to cause a message to appear by clicking on a button. I had played for a while in Blend 2.5 with the obvious functions and animations to achieve this but for some reason it didn't work out. For the opacity of the text the xaml in Blend showed errors. Visual Studio 2008 didn't show any errors but it wouldn't debug either. As for the visibility function it just doesn't work when the timeline recording is on. I get a pop up window describing: "Invalid Property Value: The Property Value is not Valid" (I like how it's refrased in case we didn't get it).

Finally I came up with the last resort, playing with a color animation. Only last night I kicked, digged, dzoned, etc. the article with a very nice result since I received useful comments. Sean made me want to give the opacity another try because it really didn't make any sense that it didn't work. He also mentions that it would be more useful in the case of having a video or an image.  So thanks to Sean here is the result:

Currently rated 2.2 by 5 people

  • Currently 2.2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

This morning I felt like recreating in Silverlight 2, with Microsoft Blend 2.5 March Preview, a little executable I made in WPF. First of all I listened to some lying-in-a-caribbean-beach-sipping-pineapple-and-grenadine-juice music to tame the frustration without having to drink any alcohol.

Back to the subject. I couldn't manage to make a message appear and disappear at the click of an object because the Visibility option "Hidden" is not available. The solution turned out to be very simple. It is actually a color animation. The initial color of the font is the same as the background. Then in the animation I changed the color to Black for 2 seconds. At 02:01:00 I added a keyframe to turn the text back to its original color. Here is the result:

This animation creates the illusion of a message appearing after being triggered by clicking a button and then disappearing. Notice the fading effect achieved by the 0.1" color animation at the end.

Update 2008 Aug 2: The app doesn't work properly because of an Event Handler issue. Will post solution in the future.

Update 2008 Sep 3: The solution is in my post Fix for: Make text appear and disappear.

Update 2008 Oct 15: The text properties are not found in type "button": in this case TextWrapping ="Wrap" and TextAlignment ="Center". I had to make the button longer so the text would fit. I also added the FontSize property because the default size was too big.

Currently rated 2.5 by 2 people

  • Currently 2.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5