Contents tagged with Silverlight
-
Blend for Visual Studio 2012 by Example: Beginner’s Guide Discount Offer
I recently published a review of Pack Publishing’s new book, Blend for Visual Studio 2012 by Example - Beginner’s Guide. Well, guess what, Pack is offering a 50% off discount if you buy it between 17th and 25th of September! You just need to use this discount code:
-
Blend for Visual Studio 2012 by Example Review
I was recently asked by Packt Publishing to review another of their books. This time it was Blend for Visual Studio 2012 by Example, a book by Abhishek Shukla (@abbeyshukla), apparently, the first book on Blend for Visual Studio, even if it still covers Visual Studio 2012, most of it will apply to 2013 as well. My interest in Blend came from the fact that I recently had to work with Silverlight, and Blend is, of course, one of the must-have tools.
-
Adding Custom Validation Messages in Silverlight
Sometimes it is useful to add our own validation messages to a Silverlight control, normally because we are doing custom validation through code, not through the reguar IDataErrorInfo, INotifyDataErrorInfo or ValidationAttributes. This is not straightforward, but it is possible. An example might be:
-
Silverlight Transform Markup Extension
Did you ever have one of those situations where you need to apply a data source to a control, but also convert the each of the data source elements?<ComboBox ItemsSource="{Binding ItemsSource, ElementName=MyDataSource}, Converter={StaticResource MyConverter}}" Width="100" Height="30"/><ComboBox ItemsSource="{Binding ItemsSource, ElementName=MyDataSource}, Converter={StaticResource MyConverter}}" Width="100" Height="30"/>
Normally we set the data source to the DataContext or ItemsSource property and add an item template where we specify the converter, but sometimes this can’t be done this way, for one reason or the other. So, I worked out a simple solution: the TransformedItemSource! What it does is, it allows us to specify a converter for each of the source values in the data source collection, not the data source as a whole.
-
Silverlight Method Data Source Markup Extension
A quick way to obtain a data source from a method through a markup extension, without any code:
-
Silverlight Resource Markup Extension
In case you want to use resources in your Silverlight applications, you have a couple of options. My favorite, however, is using a markup extension and RESX resource files. With this approach, you can have code such as:
-
Silverlight DynamicResource Markup Extension
This will be my first post on Silverlight!