Monthly Archives: August 2012

Get brush from hex color in WPF, Silverlight, Windows Phone

For an app I created I needed to create a solidcolorbrush from hex RGB string. Seems a simple task, but there is no simple way of doing this. But I’ve created simple method that does just this: public static SolidColorBrush GetBrushFromHexString(string aarrggbb) { string xamlString = "<Canvas xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" Background=\"" + aarrggbb + "\"/>"; Canvas c […]

Comments Off on Get brush from hex color in WPF, Silverlight, Windows Phone  

WP8 popup menu in the application bar

The Windows Phone mail application has a nice method to bypass the limitation of 4 items in the app bar. When you press the “response” button a pop-up appears, which let you choose “Reply”, “Reply all” or “Forward”. When I needed something in an app, I found that this was not built in the framework. This blog post […]

Comments Off on WP8 popup menu in the application bar  

Pass list or array as a parameter to a Sql query

Like most developers my first Sql query was something like: SELECT * FROM TABLE WHERE FIELD = ‘value’ Which is a good starting point to learn Sql. After some time, I combined programming and Sql together, and wrote something which most developers will recognize: rs.open "Select firstn* from Employees where lastname like ‘" &amp; textbox1.Text […]

Comments Off on Pass list or array as a parameter to a Sql query