Archive

Posts Tagged ‘silverlight 4’

3 Small Silverlight tricks you might need some day

05/11/2011 1 comment

This little article describes 3 easy tricks that might come in handy from time to time, namely:

  • How to create application-wide variables without fancy tricks
  • Allow a user to install you application as a stand-alone OOB application
  • Detect whether your application is in browser or “Out-of-browser”

Read more…

Using Linq to filter a databound listbox in WPF/Silverlight

In this short tutorial I show how to use Linq in order to filter the items shown in a listbox, which in turn is databound to an ObservableCollection.

Suppose we use the listbox created in the previous tutorial where we show the age and name of each user in the collection. All our databinding code-remains the same as before. What we have to add is a new collection in between our original source and the listbox. The in between collection is our Linq-query result. Each time we wish to change our filter, we change the query. Read more…

Tutorial on Silverlight 4 databinding in code-behind, custom user controls, etc.

10/19/2010 3 comments

Introduction

This small tutorial was written to show the students the following aspects of Silverlight:

  • Writing a class that can be used for databinding
  • Perform data-binding through code instead of XAML
  • Creating a custom user control
  • Writing simple data converters

Suppose we are creating a Silverlight game in which each player is represented as a pawn. However, the player class itself is somewhere deep inside the game-engine and we would like the pawn user control to be only loosely coupled to this player class. By doing this, we are able to make a rapid Silverlight prototype and if we later decide that the frontend is pretty lame, we can simply redesign it without too much fuss.

Read more…

Follow

Get every new post delivered to your Inbox.

Join 208 other followers