Archive for the ‘.NET’ Category

Using the new WPF Ribbon with CompositeWPF

Thursday, November 13th, 2008

When using the new WPF Ribbon CTP with CompositeWPF (aka Prism), you probably want your modules to fill the ribbon with tabs. To let modules add content to your shell window, you have to mark the designated areas as Region.When trying to add a Region name to the ribbon with ...

DateTime parsing performance

Wednesday, July 30th, 2008

In one of my current projects i have to convert a lot of strings to DateTime structures. Sometimes tens of thousands datetime-string arrive at the service per second. As performance is an issue in this project, i was looking for the most performant way to do all the stuff. that's ...

(Very) simple WPF PropertyGrid in 20 minutes

Tuesday, May 13th, 2008

Everyone that has ever worked with the WinForms PropertyGrid will miss it in WPF. Therefore i wrote this tiny turorial on how to write your own very basic PropertyGrid on top of WPF. Disclaimer:This is not a ready to use fully-featured control for production use. It just shows in a very ...

NHibernate.QueryException: unexpected token: as [from mytable as m…

Monday, May 5th, 2008

Today i encountered a strange behaviour with NHibernate. The error message in the headline was kinda confusing. I spent some time on google and everything i found was that my mapping is probably wrong or contains some bugs though i knew my mapping was definitely correct. Some time later i found ...

WCF and Streaming data made easy

Saturday, May 3rd, 2008

Wcf is great when it comes to message exchange. But Wcf even contains functionality when you want to stream data. This is especially useful if you want to transmit a huge amount of data (think about the maxBufferSize option in Wcf configuration) or you want your clients to start processing ...

WPF DataBinding and Value Formatting for fun and profit

Friday, April 25th, 2008

WPF offers great functionality when it comes to DataBinding. You can e.g. set a List of Customer-Objects as DataContext on a ListView and don't have to care about the rest.The following example shows a List of Customer's bound to a ListView: But what if you want to display some Properties of ...

Writing a custom log4net appender - WcfAppender

Friday, April 18th, 2008

log4net is a great logging library that comes with a couple of nice Appenders (these are the parts that actually log the stuff to a specific medium). It even has some appenders that can send the log data over the wire: NetSendAppender UdpAppender RemotingAppender SmtpAppender TelnetAppender ... But these appenders just did not fit my needs. ...

Writing a custom SettingsProvider - SqlCeSettingsProvider

Friday, April 18th, 2008

Visual Studio offers a nice designer for creating/editing settings for your Application. Accessing those settings via the static Settings class is a breeze and the configuration method of choice for small applications (i wouldn't use it in larger LOB applications though).But i was never happy how Microsoft solved the way ...

Lighttpd and ClickOnce

Monday, March 10th, 2008

Although it might seem that you can only use ClickOnce installers with IIS, it's not true, as all you need to do is set some mime-types in your lighttpd configuration:  mimetype.assign = ( ".application" => "application/x-ms-application", ".manifest" => "application/x-ms-manifest", ".deploy" => "application/octet-stream" )This should actually work with any other webserver, as long as ...

Guidance Automation Extensions Update!!

Sunday, February 17th, 2008

Da ich durch die side-by-side installation von VS2008 und VS2005 doch einige Probleme mit der SCSF und WSSF hatte (funktionierte nur auf VS2005) gibts nun endlich support für die Guidance Automation Extensions für VS2008 UND VS2005 auf einmal. Zusätzlich fällt nun endlich die notwendige Deinstallation der Vorgängerversion weg. Danke!http://blogs.msdn.com/agile/archive/2008/02/15/gax-gat-february-2008-final-release.aspxupdate: Die ...