Rants Tagged with “Silverlight”

<<  <  4  5  6  7  8  9  10  11  12  13  14  >  >>  (Total Pages: 14/Total Results: 131)

Updated Version of Sidebar Gadget using Silverlight

Here is an updated version of my Sidebar Gadget built with Silverlight.  Unfortunately due to a limitation of Sidebar gadgets, everything must still be self contained so you have to in-line the XAML and no use of video is supported.  If anyone finds workarounds for this, please let me know!

More of My Silverlight Videos Released

Silverlight.net released two more of my videos today.  If you're learning Silverlight, these videos are a great place to get started.  Here's the latest videos:

I will be opening my new Silverlight section here on the site in the next couple of days to gather all my Silverlight content, examples and videos.  Look for it soon!

Non-Generic Collections are being Yanked from Silverlight 1.1

Thanks to Joe Healy for sending me a link to the BCL team's blog about this.  Essentially they are eliminating unnecessary collections.  All non-Generic collections are being removed (as they aren't that necessary) as well as a couple of generic collections that they don't think are core functionality (Queue, Stack and LinkedList).

They hint at a future preview of 1.1 but no indication of a real date it.  Too bad.

New Silverlight Video - Designing with Blend

In this new Silverlight Video, I show you how to use Expression Blend to create a simple design including clipping paths and grouping. 

Silverlight et al.

Just a note to regular readers...I've been heads down preparing my Silverlight Workshop so my postings been sparse lately.  Look for more rants soon!

Silverlight Video Series - First Video is up!

My first video for the Silverlight.net site is finally up.  Click through to see me explaining how to create a Custom Error Handler in Silverlight. There are a lot of videos to come and they've promised to publish at least one a week.  Grab the RSS feed if you're interested in learning Silverlight, one video at a time!

(Also, we are doing a Silverlight Workshop on July 16-18th in Atlanta, Georgia.  Sign-up today!)

Interesting Take on the "Silverlight v. Flash" Discussion

While the author freely admits that he is biased as a scorned Flash user, I think his analysis of the features is an interesting take.  I won't spoil it for you but please read this if you want to discuss the differences with an open mind...

Silverlight and Timers

I was doing a Silverlight video player for some videos I am doing and I was playing with different ways to show the timeline of a playing video. There are a couple of ways to do this, but in Silverlight 1.0 the typical way was with an animation on a hidden Canvas that you restart over and over to mimic the behavior of a Timer:

<!-- The XAML -->
<Canvas ... >
  <Canvas.Resources>
    <Storyboard x:Name="theTimer">
      <DoubleAnimation Storyboard.TargetName="timerCanvas" 
                       Storyboard.TargetProperty="(Canvas.Left)" 
                       From="0" To="1"  
                       Duration="0:0:0.1"
                       Completed="theTimer_Completed" />
    </Storyboard>
  </Canvas.Resources>


  <Canvas x:Name="timerCanvas" Opacity="0" />

</Canvas

This is hacky to me but it works great in Silverlight 1.0.  I wanted a better Silverlight 1.1 solution so I though, "Hey, its .NET...I'll use a timer":

Timer timer = new Timer(new TimerCallback(timerFired), 
                        null, 
                        500, 
                        500);

And the Handler:

void timerFired(object o)
{
  // Does not work because I can't update the UI thread from a non UI thread
  progressBar.Width = ((double)videoPlayer.Position.Seconds / 
                       (double)videoPlayer.NaturalDuration.TimeSpan.Seconds) 
                       * progressBack.Width;
}

In Silverlight 1.1 the XAML stack does not support a Dispatcher as such. In fact there is no cross thread messaging at all. Incidently, this has been reported on the Silverlight.net Forums and they've said that they are going to add a high-performance timer in the Beta timeframe of Silverlight.

But I wanted an answer now and the only one I could find (without resorting to the fake Animation) was the HtmlTimer class. NOTE: The Silverlight team warn against using the HtmlTimer as it is it not high performance enough, but for prototyping Silverlight 1.1, I think its fine. Here's the HtmlTimer implementation:

// Use a Timer
HtmlTimer timer = new HtmlTimer();
timer.Interval = 100;
timer.Tick += new EventHandler(timer_Tick);
timer.Start();

And the Handler:

void timer_Tick(object sender, EventArgs e)
{
  // Works because the HtmlTimer does not use a separate thread
  // But may be a bit choppy as the timer not very high resolution
  progressBar.Width = ((double)videoPlayer.Position.Seconds / 
                       (double)videoPlayer.NaturalDuration.TimeSpan.Seconds) 
                       * progressBack.Width;
}

Not perfect, but good enough for now...

Silverlight Versioning is Funny...I think...

I am looking through the breaking changes for Silverlight and I saw this and just about kvetched.  Glad to see that some people at Microsoft are just as confused about versioning schemes as the rest of us. This is the Version Detection section from the Silverlight changes document verbatim:


Version Detection

Silverlight 1.0 Beta and 1.1 Alpha will follow this versioning scheme:

Silverlight.js contains a "version" property that checks for the proper version and directs users to the install location if the proper version is not installed.

Silverlight 1.0/1.1 Breaking Changes (from February CTP)

In case you are converting older WPF/E code to Silverlight, here is an eminently useful link to the breaking changes since the February CTP to Beta 1.0