Posts

Showing posts from June, 2010

Silverlight 4.0 Tutorial (2 of N)

Image
Read Part 1 here Continuing our RegistrationBooth Application, in the previous post we ended having a data grid that displays all the attendees, let’s now implement the interface for registering a new attendee - We will create a user control for registering a new attendee, right click the Views folder in the RegistrationBooth project, select add new item, choose Silverlight User Control and name it RegisterAttendee. - Use the VS designer to add two columns for the LayoutRoot grid, one for the labels of the controls and the other for the controls, create also five rows for the different properties. - Add the four labels and four text boxes to the first four rows of the grid, these controls will be used for the FirstName, LastName, Email and company properties. - The fifth row will be for the photo, will use the Silverlight 4.0 new feature that allows us to access the webcam, so add a “Photo” label in the first column of this row, and in the second column add a Grid with three column

Silverlight 4.0 Tutorial (1 of N)

Image
I will start writing a set of posts that can be used as a tutorial  for using Visual Studio 2010 and Blend 4.0 to build Silverlight 4.0 applications. so what is the application we are going to build?? Problem Statement as part of our community activities we hold many offline events, at the event we need to gather the attendees information(sort of onsite registration), give them feedback forms so that they can evaluate the sessions and also use these forms to select winners for the raffle draw. so i tried to create a simple application that we will host on a PC/Laptop at the event venue, we will call it the RegistrationBooth Application. Solution  the RegistrationBooth Application will: - Allows the user to register his/her information through a simple easy interface. - Automatically print a name tag for the user once registered. - displays a list of all the registered users. - displays the event agenda. - allows the users to easily evaluate the sessions they atte

Data Binding to Anonymous Types in Silverlight

Trying to bind Silverlight controls to anonymous typed objects will not work, this is because anonymous types are internal, and Silverlight doesn't support reflecting against internal types. Sources: http://dotnetslackers.com/Community/blogs/bmains/archive/2009/04/28/silverlight-accordion-doesn-t-like-anonymous-types.aspx http://blogs.msdn.com/b/mark/archive/2008/11/18/anonymous-types-and-silverlight-databinding.aspx A solution to this is to expose your internals to the Binding framework as illustrated here: http://stackoverflow.com/questions/2684954/silverlight-4-data-binding-with-anonymous-types