Monthly Archives: August 2012

Use the WP8 appbar in ANY MVVM framework

While some frameworks, like Caliburn.Micro,have the possibility the use the appbar button with no code at all in the cod behind file, most frameworks don’t. This blogpost explains how you can use the appbar buttons in any mvvm framework the doesn’t support this feature, like MVVM Light or NRoute. The solution I found is very […]

Comments Off on Use the WP8 appbar in ANY MVVM framework  

Jquery.selectbox inside updatepanel fails postback

For an ASP.NET website I worked on a while ago I’ve use the jquery selectbox to make the dropdownlist look a little nicer (this is just an ugly example, I’m not a designer): This looks great and worked great until the dropdownlist was placed inside an updatepanel. The first time the paged was loaded it […]

Comments Off on Jquery.selectbox inside updatepanel fails postback  

MsSQL having max(id) = id problem –> row_number partition

One problem I haven’t been able to solve in a satisfying way is to create a query that returns a full row based on an aggregate function. Suppose we have the following database schema: If you need to write a query that returns the most expensive book for each customer you probably would first write […]

Comments Off on MsSQL having max(id) = id problem –> row_number partition  

WPF how to stretch listbox content item

Something I’ve been search for, for quit some times is how to stretch the content of a listbox in WPF. If you add a textbox to a listbox item, the textbox will only take as much space as it needs (to make it more visible I’ve add a border and a backgroundbrush): Of course I’ve […]

Comments Off on WPF how to stretch listbox content item  

Use XAML resource in WPF IValueConverter

If you don’t want to hardcoded styles and colors in you WPF, Silverlight or WP7 project you’ve probably added some styles and predefined colors in the APP.XAML file: <Style TargetType="TextBlock" x:Key="Style1"> <Setter Property="Foreground" Value="Black"/> <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeLarge}"/> <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiLight}"/> </Style> <Style TargetType="TextBlock" x:Key="Style2"> <Setter Property="Foreground" Value="Red"/> <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/> <Setter Property="FontFamily" Value="{StaticResource […]

Comments Off on Use XAML resource in WPF IValueConverter