(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

Disabling items in a Silverlight ListBox

(0 votes)
0 comments   /   posted by Silverlight Show on Mar 11, 2009
Tags:   ListBox , Layout , MVVM

Andrej Tozon has a quick tip on making the ListBox items behave as disabled.

The data context of this ListBox is a ViewModel with the Lights property. Lights is a collection of five Light objects.

One property that the Light object exposes is the Brush property; it will simply point to a solid color brush of a red, yellow or green color, respectively. The Ellipse’s Fill property is bound to the Brush property as can observed in the above code.


Comments

No comments

Add Comment

Login to comment:
  *      *       
Login with Facebook

Our News on Twitter