Archive for the 'Uncategorized' Category

Properties with property changed event, part 3

A while ago, I talked about how to write basic events for changed properties, and about the INotifyPropertyChanged interface. There is a third way to manage events, which is especially useful when your class has many events, but you expect a very low number of them to be actually handled.

As discussed before, every EventHandler stored in your object takes up space, which is a bit of a waste if most of those will be null. But events allow you to implement the add and remove methods yourself, so you can choose where to store the EventHandler delegate.

One way to do that is through the System.ComponentModel.EventHandlerList class. System.ComponentModel.Component exposes an Events property of this type, which is used by all classes inheriting from Component, including all Windows Forms controls.

See my U2U blog for a complete example, featuring a CueBannerTextBox (like the Internet Explorer 7 search box) with a CueBanner property and a CueBannerChanged event.

Technorati Tags: , , , , ,

Close the windows, please!

We went on a safari yesterday, in Safari Park Beekse Bergen in the Netherlands. The kids loved it, and I must admit it is quite impressive to drive your car through the park with nothing but a thin window between you and the lions. They don’t look too hungry, but you never know!

It’s not as if the lions are the only big animals you can watch from just two meters away. Rhinoceros, elephants, zebras, and all sorts of deer are all quite impressive when you get so close to them. Not to mention the giraffes, when they start running towards you!

Definitely a family day out I can recommend!

Hello world!

In AustriaSome people keep on asking me why I don’t blog. It seems it’s just something one should do in the twenty-first century. Then again, I often enjoy reading other people’s blogs, so maybe I should indeed return the favor. I looked around a bit for a site to host it, and I found It looks good (technically speaking, I’ll work on the graphics…), and it seems to have the features I want (including the must have RSS feed).

So now I have to deal with the white sheet of paper, and fill it. I guess I’ll be sharing experiences from my boring hobbies and fun work with you. Expect technical stuff, mostly on .NET. Geeky stuff maybe. But you might also get to see some of the pictures I shoot. I might even be funny from time to time. Well, I’ll leave that up to you to decide.

Talk to you soon.