Silverlight Claim-Based-Security

This would hopefully be a multi-part series showing some tricks to enable claims-based-security in Silverlight 4.0. Silverlight 5.0 would have a much better story around claim-based-security as mentioned here. In this first post, I’ll give you a high level overview of the solution. The main idea is to use the ‘WCF Routing Service’ in the…

1

Generating images using WPF on the Server

… and ‘plugging any nasty leaks you might see’. Recently I worked on a proof of concept where we wanted to leverage the power of WPF and DataTemplates on a server to generate images. This is actually surprisingly easy and, unsurprisingly, very powerful. The project planned to use WPF to generate images for a PivotViewer…

0

Simplifying commands in MVVM and WPF

I’ve been using MVVM since I started WPF (I was a latecomer to the beauty that is WPF) and one of the things that’s always irked me is the amount of code you need to write in order to expose a command. I’ll typically write something like the following in order to create a command…

0

Model-View-*

I find myself answering questions related to the presentation patterns repeatedly. Since I am a lazy person, I am writing this post to illustrate my understanding and interpretation of the Model-View-* patterns and their variations so I can refer back to this post later. [Update] I have discussed these patterns and their contexts with my…

0

The Binding you wanted from day one in WPF

Remember when you started playing with WPF? Remember when you coded your first binding? {Binding ElementName=slider, Path=Value} and then remember what you wanted to do next? Something like this I’m sure… {Binding ElementName=slider, Path=Value/2} (in case you missed it, I’m trying to divide Value by 2). At least I know I’ve always yearned for basic…

0

New snippets for Silverlight and WPF

A while back I posted some snippets for WPF here: WPF Snippets for Visual Studio. I’ve been wanting to update these for a while now and finally got around to it this morning. Here are the new snippets. basevmThis is a snippet that effectively replaces the inpc snippet (although that is still included for demos…

0

A Suck Less Event Aggregator for Prism?

  I heard on twitter the other day (Yes, I now tweet occasionally. If you’d like to waste literally seconds of your day you can follow me at joshtwist) that some folks at an Alt.Net UK event where giving P&P and Prism a rough ride. Specifically, they had some issues with the EventAggregator – citing…

0

How to work with PropertyChanged’s smelly name string

Karl posted an interesting article recently INotifyPropertyChanged – How to remove the Property Name String Code Smell. It’a nice implementation and the resulting code certainly looks a whole better. As Karl notes the biggest problem this approach faces is one with performance. Notably, the proposed implementation is a lot slower when there are listeners wired…

2

Five minute recipe for a decent BoolToVisibilityConverter

There are a bunch of IValueConverters that WPF probably should ship with… MultiplyConverter, AdditionConverter etc. Rather oddly it does ship with one: The BooleanToVisibilityConverter: However, I’m not a huge fan of the implementation as it gives me little control over what true and false actually map to. For example, should false be Collapsed or Visible?…

0

Improving Performance of images used with 3D

I’ve been working on some 3D using WPF and was making heavy use of some largish (around 1 megapixel) images with ImageBrushes applied to DiffuseMaterials. Naturally, being WPF there was some animation thrown in for good measure to make sure I’m working that processor like a bad boy. All was going well, except for one…

0