Silverlight

Specifying collections as data source in Design view

One of the nicest design-time features of WPF and Silverlight is the ability to specify data in design time, allowing your designers to work with controls already filled with data without starting the whole application. However, there's not much hints on how to work with it for slightly more complex and non-trivial scenarios, for example when binding to a collection.

DataGrid highlighting behavior: version for Silverlight 4

Silverlight 4 allows data binding for any DependencyObject, so DataGrid highlighting behavior from one of my previous articles could be written for Silverlight 4 much easier, without the help of BindingListener class. In fact, the previous version won't compile for Silverlight 4 at all, because the whole Expression Blend samples library does not work for Silverlight 4 and is no longer supported. Much simpler and elegant version of DataGrid highlighting behavior is in attachment.

Flex\Flash\AIR vs Silverlight: conquering the land of RIA

We are living in interesting times. Rich internet applications with next generation user interface are in increasing demand, and so the great RIA war is raging on, with Adobe and Microsoft as major players struggling for market prevalence. The competition is good, as it forces both companies to deliver new versions of their products more rapidly, and with more and more impressive sets of features. The competition is bad, as it forces companies to haste, sometimes delivering features in raw and incomplete form, and focusing more on new features than on polishing the existing ones. And the war makes the situation changing so fast that sometimes it's hard to understand what's going on at this very moment. That is why it's always good to write yet another article trying compare both technologies: yes, there are a number of other articles doing the same job (like this and this, for example), but they are becoming outdated very rapidly, and sometimes miss one or another important topic.

DataGrid highlighting behavior

Yet another attached behavior for Silverlight 3 that may be quite handy - one that dynamically highlights text inside DataGrid. It does not require changes in DataGrid itself - just attach the DataGridHighlightingBehavior to your DataGrid and tell it the substring you want to highlight, it'll do the rest.

Bindable event-driven MessageBox for Silverlight

Here we present an approach allowing to standardize MessageBox-like scenarios, making them much more designer- and test-friendly.

Enhancing AutoCompleteBox part 1: distinguishing similar items

Among other novelties Silverlight 3 also included new and very useful AutoCompleteBox allowing to make smart suggestions to a user during text input. Unfortunately, as it always happens with new and pretty complex controls like that, there are some scenarios when you can't avoid changing or enhancing its default behavior to get the functionality you want.

.NET RIA Services: intermediate model validation.

I'm not the first person firmly believing that validation should be mostly entity-based, not UI control-based. It's the object who must tell the system what kind of values should its field accept, user interface should only display this info. Microsoft Enterprise Library Validation Block was a serious step in the right direction, but uniform handling of data-based validation exceptions in user interface required quite a bit of custom coding there - just to make your UI know that the data was invalid.

Now, with validation attributes in System.ComponentModel.DataAnnotations namespace uniformly supported both in Silverlight (through .NET RIA Services) and in ASP.NET Dynamic Data, Microsoft makes even more serious step in supporting entity-based validation.

Hints on fighting the dreaded crash in XcpImports.MethodEx

In programming for Silverlight platform, one commonly encountered problem is a crashing with an error like:

Message: Unhandled Error in Silverlight 2 Application Value does not fall within the expected range.
   at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at System.Windows.DependencyObject.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)

Syndicate content