Main contents

Missing .NET Category Archive

The Missing .NET #8: Displaying Enums in Windows Forms

10 November 2008

The .NET framework is huge, but not so huge that it does everything for everyone; there are things that they in Redmond miss or don’t do for whatever reason but is still generally applicable to many developers. So, dear reader, I present to you a series of posts on stuff I find missing in .NET, [...] Read more »

Posted in .NET, Missing .NET | 1 Comment »

The Missing .NET #7: Displaying Enums in WPF

2 September 2008

Enums are here to stay and we have to deal with them in various ways; displaying them to the user is one way they have to be dealt with. I’ll give a treatment of how to display an enum in WPF in this post. You’ll see that displaying them in all situations is non-trivial. Read more »

Posted in .NET, Missing .NET | 6 Comments »

The Missing .NET #6: Version Tolerant Serialization

7 July 2008

In .NET 1.1, serialization (binary serialization, to be clear) is a bit hairy when you’re successful enough to ship multiple versions of your product and you don’t consider versioning until the first bug report about serialization problems. Changing the type, by either adding or removing fields, in .NET 1.1 causes previous versions of your type to lose their mind. The only way to deal with it was to implement ISerializable, which is fraught with problems, not the least of which is it makes you entirely responsible for serialization and deserialization of the whole type for ever and ever. When we found this out, this mass hysteria gripped us, so every serializable type had to implement ISerializable, even it were new to the next version, which is now a maintenance nightmare. We also got sloppy and applied the same boilerplate serialization code to every type. So we didn’t handle it well, but you didn’t really have a choice in .NET 1.1. Read more »

Posted in .NET, Missing .NET | 2 Comments »

The Missing .NET #5: Tracepoints

16 June 2008

Lately, I’ve been debugging windowing code often. Windowing code is stuff like window sizing, resizing, painting, etc.; code that has something to do with drawing the window. Debugging that code used to be fairly arduous because anytime you stepped into your method, looked around, then started execution again, the windowing code would need to be re-run because you had Visual Studio focused and not your app; since you have a breakpoint in the windowing code, Visual Studio would break into your method which you probably didn’t want this time because you were already there, so you hit F5 again to continue execution and start the cycle over. Read more »

Posted in .NET, Missing .NET | 1 Comment »

The Missing .NET #4: Cue Banner in WPF (I mean, Watermark in WPF)

2 June 2008

A regular reader would know I’m quite enamoured with the Cue Banner as UI tool. Once again, in WPF, Microsoft missed something fairly obvious for inclusion; and really easy to implement, as we’ll see. We’ve been through 2 revs of WPF since its release, and the number of new controls or new features on old controls is disappointing. In case you missed it, .NET 3.5 SP1 Beta was released a few weeks ago. The grand total of new controls in WPF? One; admittedly, a useful one – a WebBrowser control. Read more »

Posted in .NET, Missing .NET | 16 Comments »