Home Contact

Timmy Kokke

…just sorting my bubbles…

News




Timmy Kokke's Blog

↑ Grab this Headline Animator

Timmy Kokke at Blogged

Twitter












Tag Cloud


Archives

Post Categories

Image Galleries

Silverlight

Syndication:

December 2008 Entries


Getting items of a type from a collection using LINQ

There are a lot of situations in Silverlight and WPF where you would like to get a list of items from a collection of a certain type. For example all textboxes in a Grid, or all customer records from a ListView. LINQ provides us with an extension method to do this very easily, the OfType<T>() extension on IEnumerable: public static IEnumerable<TResult> OfType<TResult>( this IEnumerable source ) Let me explain the use of this method thru some examples. Say you have a grid with some...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Sending queryparameters to Silverlight

Ofter there are situations where it’s needed to pass parameters to Silverlight. For example a webshop where you would like to display a product, or a Twitter application where you would like to show information about a certain user. The Silververlight control has an string property InitParameters. When passing any string to this property it can be read by the Silverlight application. Where the query parameters property in Asp is a string, in Silverlight this is changed into an IDictionary<string,...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati