-
|
The Best from DevelopMentor
|
MORE
|
-
Using Model – View – ViewModel with Silverlight
have found it extremely easy to use when developing very different applications and have used the design pattern recently in both ASP.NET, WPF and Silverlight applications. Even thought the UI technology used doesn't change the basic MVVM pattern there are some subtle differences, like not easily being able to use ICommand in Silverlight, so I decided to create a small Silverlight sample. The basic structure goes like this: The user interacts with a View, implemented as a Silverlight user control. Tags: NET DevCenter WPF Silverlight 11: {. 13: set. 14: {.
The Problem Solver
- Tuesday, April 7, 2009
-
Paging with the Silverlight RIA services DomainDataSource
Using the declarative DomainDataSource that is part of the upcoming Silverlight 3 RIA services makes it quite easy to work with data. Tags: NET VB DevCenter Silverlight Data Access ASP.NET.All you need to do is add a DomainDataSource control to the the XAML, point it to the generated DomainContext class (in this case NorthwindContext) and tell it which method to use to load the data from the web service(in this case LoadCustomers). Next add a DataGrid to display the data and you are good to go. Adding paging. assume this is just a small bug in the current preview. Enjoy!
The Problem Solver
- Monday, April 27, 2009
-
Getting T4 templates to work with Silverlight
In a previous blog post I mentioned that T4 templates didn’t quite work with Silverlight development. The reason being that Visual Studio decides to load the Silverlight version of System.dll which doesn’t contain all the required classes. Tags: NET Silverlight Fortunately I was not the first person to run into this limitation, Jason Jarrett did as well and he described the solution in a blog post here. The solution turns out to be surprisingly simple, just not very obvious. All you need to do is include the following line at the top of the T4 template. 11: {.
The Problem Solver
- Monday, March 23, 2009
-
Using dynamic objects in Silverlight 4
Note: This blog post is written using Silverlight 4.0 RC 1 One of the cool new features in Silverlight 4 is the ability to data bind to indexed properties. Tags: NET Silverlight ASP.NET VS2010 This means that even if you don’t know at design time what properties you data object has you can still data bind to them. The syntax is very similar to a normal data binding, only in this case you need to use the [key] syntax instead. For example in example below the FirstName is a regular property while the LastName below is an indexed property. get; set; }. public Person(). {.
The Problem Solver
- Monday, April 12, 2010
-
Using T4 templates with Silverlight
And that is exactly what I tend to do in my Silverlight line of business applications. So I decided to try using T4 with a Silverlight project. And While the System.CodeDom.Compiler namespace exists in Silverlight the required classes like CompilerError and CompilerErrorCollection do not. This really is a shame as there is really no good reason that T4 templates do not work for Silverlight. Tags: NET Silverlight ASP.NET.Everyone who has Visual Studio 2008 also has T4 templates that can be used to generate code, or anything else textual for that matter. 10: {.
The Problem Solver
- Saturday, March 21, 2009