Silverlight LOB Forms

Wednesday, November 19, 2008 4:12:32 AM (GMT Standard Time, UTC+00:00)

I’ve been thinking a lot lately on how different types of layout controls can be used make the tools and the framework do the heavy lifting for us in our Silverlight Development. Karl Shifflett recently posted an example creating a custom WPF control to make it easier to layout a data input screen and I decided to build out a Silverlight version.

The control extends an ItemsControl to use a custom container that provides a text label and layout for input controls.

image 

The result is a custom control that allows me to add input controls such as TextBoxes and CheckBoxes and get labels and much of the styling for free. Silverlight’s DataBinding capabilities allow me to set a DataContext for the FormControl, and then simply specify an individual binding for each field.

<TextBox Zelt:FormItem.LabelContent="First Name" Text="{Binding FirstName}" Width="250"/>
<TextBox Zelt:FormItem.LabelContent="Last Name" Text="{Binding LastName}" Width="250"/>

Utilizing this type of markup allows for a lot of potential in tool support. I’m sure that Karl plans to support this type of content in his XAML Power Toys add-in.

I’ve got a few additions before I share out the code, but I’d welcome any feedback on this approach.

Posted in Silverlight  | Comments [3] 


Tuesday, November 25, 2008 1:00:39 PM (GMT Standard Time, UTC+00:00)
Hi Rob,

This looks like a very useful development and just what is needed for a Silverlight LOB application. I look forward to the code release.
Sarah Boys
Saturday, January 31, 2009 9:53:53 PM (GMT Standard Time, UTC+00:00)
Hi Rob,

Nice post. Are you still planning on releasing this code?

Thanks,

Michael
Michael Gerfen
Tuesday, November 17, 2009 9:33:54 PM (GMT Standard Time, UTC+00:00)
Hi Rob,

I was just reviewing Karl's blog about his work with WPF and asked it he had a Silverlight version. I was thinking about attempting to convert his over to silverlight but thought I would keep looking for one already done. Did you ever release this code? I would be very interested in looking at it since it's the best concept that I have seen so far in regards to silverlight.

Jim
Comments are closed.