A day in the life...

public class GeekEarth : Earth { }
posts - 14, comments - 22, trackbacks - 0

July 2009 Entries

PropertyChangedEventHandler is not marked as serializable

My data-transfer-objects implement INotifyPropertyChanged, which was giving me a problem whenever I tried to serialise them over a Remoting session.  If you try to add [NonSerialized] to the event you get an error informing you that you can only apply this attribute to fields, and not properties. The solution is pretty simple, I think the .NET compiler should do this by default. 1: [NonSerialized] 2: PropertyChangedEventHandler propertyChanged; 3: public event PropertyChangedEventHandler PropertyChanged 4: { ...

posted @ Friday, July 24, 2009 10:27 AM | Feedback (0) |

Partial declarations of must not specify different base classes

I wanted to use a common base class for a set of UserControls in my WPF application, but when I changed the class’s ancestor in the code file and compiled I would get the error “Partial declarations of must not specify different base classes” This is because when you compile a WPF application Visual Studio generates a partial class in a code-behind file automatically, the base type specified is always “UserControl”.  To solve this problem change your XAML from this 1: <UserControl 2: ...

posted @ Thursday, July 23, 2009 12:08 PM | Feedback (7) | Filed Under [ Code ]

Models, views, controllers

I’m working on a new app which will have WPF as its user interface.  With the slight nag in the back of my mind that someone might say “No, we want WinForms” (I hope not) I decided there should be as little code in the UI as possible so I opted for a view/controller approach where my controller will perform all of the logic and the view will only do “viewy” things. One of the features of this app is that some of the views should appear as modal windows (such as a splash window during start-up) but others...

posted @ Friday, July 17, 2009 4:38 PM | Feedback (0) | Filed Under [ Code ]

SandShell components for WPF

I was looking for an outlook bar style control for WPF.  I knew a guy named Divil from IRC had written some stuff so I decided to take a look.  The first thing I looked at was Wunderbar, looked like what I wanted so I downloaded the trial. I opened up the demo solution to see how it all works, but the problem is that the single window shows how it ALL works.  It doesn’t demonstrate different concepts in different windows, it shows you how someone who already knows how to use the controls would create a complex user...

posted @ Thursday, July 09, 2009 2:14 PM | Feedback (8) |

Powered by: