Filed under | 0 comments
»
C Posts1-5 of 13
Efficient Code (Friday, January 30, 2009)Writing code may look easy to some and hard to others, but some programmers always tend to write messy, smelling, ugly-looking, inefficient code.
Filed under | 0 comments
»
OutOfIdeasException! (Thursday, January 01, 2009)Today I got a funny error message! Showing a simpel Form I got an OutOfMemoryException! Further investigation showed that an actual NullReferenceException is the cause of this. The question is, why a NullReferenceException would convert to an OutOfMemoryException!!!
Filed under | 0 comments
»
Enhanced INotifyPropertyChanged - Revisited (Tuesday, September 09, 2008)A while a go, I had a post regarding how to implement the INotifyPropertyChanged event in a more proper fashion. You didn't have to hard-code the property name, and could instead use a linq expression, which with a help of an extension method, the name of the property is easily extracted, and passed to raise the PropertyChanged event. Simple, right? public static class EventExtension{ public static void Notify<T, TValue>(this T instance, PropertyChangedEventHandler handler, Expression<Func<T, TValue>> selector) where T : INotifyPropertyChanged { if (handler != null) { var memberExpression = selector.Body as MemberExpression; if (memberExpression == null) throw new InvalidOperationException("selector should
Filed under | 2 comments
»
Splashing WPF (Wednesday, August 20, 2008)Since WPF application's startup were slow, specially when cold starting, I always ended up thinking "How can I add a splash screen to my WPF application?", but if you create a splash screen in XAML there are lots of things that should be loaded before your splash screen is shown....see the irony in that?I've had my own way of doing it, but what some people did was to create a Win32 library to display the splash screen (a simple picture), so the splash screen is shown as soon as the first bits of the applications is run, then when the
Filed under | 0 comments
»
Caliburn or Prism (Saturday, July 19, 2008)I was using Caliburn framework on a pet project of mine for the last couple of weeks. At some point of time, when I merged my custom made styles, application did not open views anymore, complaining something is wrong with my styles. I spent a lot of time to figure out what is wrong, but found nothing, except if I do NOT use custom styles everything is working fine (Maybe that IS a proof of my styles having some error!).So, I decided to port the application to Prism (now called Composite WPF). How smooth was the port procedure, you might
Filed under | 0 comments
»
AdvertisementSubscribeArchives
|