attached behaviors

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.

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.

Syndicate content