Feeds:
Posts
Comments

Archive for March, 2008

It seems that there is some confusion on how to add the Silverlight data controls to your Silverlight 2.0 project.

1. Add reference to System.Windows.Controls.Data.dll.

2. Add an xmlns attribute to your root tag.

image

3. Use the DataGrid control in your XAML.

image

Read Full Post »

I ran into some Silverlight install problems on one of my computers.   The Silverlight runtime installed fine. The SDK installer and the modifications to Visual Studio 2008 was where I ran into trouble.

Here are two blog posts that I found useful in solving these problems.

BradleyB
MichaelSync

Error Messages

“Could not load type. Microsoft.VisualStudio.Web.Silverlight.IVsSilverlightService”

“The project type is not supported by this installation”

Read Full Post »

.NET 3.5 shipped a few months ago.  There are a number of improvements that apply to WPF applications.  Today I want to talk about the Binding class improvements.

Performance

Some good news on the performance front.   The WPF and ADO.NET team have spent considerable resources improving the data-binding performance.   More details in future posts.

Binding Class

In .NET 3.0 you turn on Validation for a bound element by add in a ExceptionValidationRule to the Binding.ValidationRules property element.  As you can see in the following example the XAML gets a bit wordy.

 

image

In .NET 3.5 you can use this simpler property attribute syntax.

image

IDataErrorInfo and the Binding class

The data-binding engine in WPF is a suburb first release.   The underlying framework is well designed and very extensible.  Like any first release though there are rough spots.

One issue is with 3.0  is in how data validation is performed.  Most of the time you want your business class to perform the validation.   That way, any client (including UI clients) can use the class and you are ensured consistent validation.  The last thing you want to have is any validation rules in your UI layer.

In 3.5 you can retrieve the error from IDataErrorInfo in your business class.   The simplest XAML you can write for listening to these errors is below.

 image

Read Full Post »

A preview version of Expression Blend for designing Silverlight 2 applications is now available.

http://silverlight.net/getstarted/#beta

–Mix08–

Read Full Post »

Microsoft is releasing several thousand unit tests for the Silverlight controls.  These will be released under an Open Source license.

-Mix08-

Read Full Post »

What if your customers are watching a video on your site and their bandwidth is flaky? For the first five minutes they’ve got a solid high speed connection but then the bandwidth drops drastically.  What happens to the video playback?   Does it stall for a few seconds and then startup again?

Silverlight 2.0 will intelligently switch the video to low bandwidth streams when it detects the drop in speed.  You need to to publish multiple streams of your video on web server to enable this behavior.

–From Mix08–

Read Full Post »

Scott Guthrie just announced that the Beta is now available

http://silverlight.net/getstarted/#beta

Read Full Post »

Scott Guthrie writes another amazing article, this time about using Expression Blend 2.5.  His 40 page, 4,000 word post shows how to build a Silverlight chat application with the upcoming Expression beta.

Read Full Post »

Soon, very soon, Microsoft will open the Mix08 information floodgates.  Microsoft employees and partners will be released from their NDA shackles and we’ll finally learn what’s been cooking in the Silverlight kitchen.  At Mix07 I heard an excited buzzing sound in the conference hallways as attendees discussed the ramifications of the Silverlight announcements.  Managed code. the Dynamic Runtime (DLR), streaming media  servers,  full support for most browsers and complete Mac support.

 

Jesse Liberty: “I sat in on the keynote [at Mix07]. When it concluded I was so blown away by the sea-change represented by Silverlight that  I decided that my own business would immediately dedicate itself to Silverlight”

Jeff Prosise: “Silverlight is likely to be the  ‘most significant web programming’ tool to emerge from Microsoft this decade. and will have a major impact on anyone doing web development with Microsoft technologies”

Colin: But this, I believe, is just the start of a potentially brilliant strategy for Microsoft, as I’ll now explain.

Bringing .NET (and scriptable .NET) to multiple browsers and multiple operating systems is a huge deal. It really does mean that all the investments that people have made in .NET, can be leveraged in many many ways.

Josh Holmes: ” 

If you haven’t figured it out yet, I’m pretty geeked about Silverlight and am looking forward to being able to factor it into every browser based application that I work on to see where and when it fits.

Billy Hollis calls HTML the COBOL of the web. There’s a lot of truth to that to be honest. CSS helps. AJAX helps more but you really can’t get to a Rich Internet Application (RIA) with these technologies. Silverlight is Microsoft’s answer to that RIA gap. “

I expect some interesting announcements from Mix08 too.

The Promises

Every since Silverlight 2.0 was announced Microsoft has dropped hints about what is coming.  Yes, they’ve had specific announcements (DLR, managed code, etc.) but they’ve also hinted at other items.

Controls:  We want controls.  We want our textboxes and buttons.  Give us list controls (listbox and combobox).  While you’re taking down our request, just give us all the controls in WPF/Winforms and ASP.NET too.  Will we get all these controls?  Time will tell, but I bet we’ll see at least the basic of controls

Databinding:  WPF has a wonderful data-binding framework.  Winforms and ASP.NET both support bindable controls.  Oh yeah, we’d like LINQ support too.  Please?

Better Designers:  There is an obvious need for design-time tools.  Expression Web is an incredible tool for designing web sites.  When will Microsoft create a dedicated tool for Silverlight applications?

Styles and Template: One of the most powerful features of WPF is the control and data templates.  The ability to change the look and feel of a control without changing it’s implementation is a brilliant move.   Microsoft has said that templates are coming to Silverlight.  Will it be this week?

WPF Parity:  What I really want from Silverlight is the full power of the WPF framework.  I’m talking about full parity with the WPF feature set.  Talking to some of the WPF/Silverlight team in the last year it is a apparent that this is a long term goal of Microsoft too.  I know that it will take a while to reach this goal but I really don’t want to wait :>  Soon we’ll see how close Silverlight 2.0 is to this lofty goal.

New Silverlight Beta release

The  Silverlight 1.1 alpha release is old. Very old.  We’re talking almost a year old, which is long time in software beta years. Obviously Microsoft decide to concentrate on getting the new features into Silverlight 2.0 and not worry about creating interim CTP releases.  There is a beta release coming for Silverlight.   Everybody I talk to an Microsoft says that is will be soon.  When I try an pin them down to a date, will it be in time for the Mix08 conference for example, I get the stock answer. “Some time this spring.  

Will we see a new Beta build this week.  I hope so!

 Update:  Apparently I missed Scott Guthrie’s post last week  announcing the Silverlight 2.0 beta.  His tutorials discuss some of the missing features like layout panels, templates and controls.   I guess that releases my NDA on talking about these topics.  I’m sure that there are many more surprises on the way though. 

Read Full Post »