Ayende @ Rahien

Refunds available at head office

Setting expectations straight

I am currently working on getting a beta Icon version of NH Prof out, but I run into a problem. There are several features that I intend to put into the release version that I didn't have the time to actually put it. Those are usually features that are good to have, but not necessarily important for the actual function of the tool. One of them is saving & loading the captured data. Currently, I am working on more important things than dealing with this, so I didn't implement this.

However, I do want to make it clear that it will be supported, and more than that, I want to make it clear that it it is not there yet.

Using my amazing WPF skills, I manage to whip up the following:

image

Which is located on a style set on MenuItem. This means that the only thing that I need to do to mark a menu item visually as unusable is to set its Tag attribute to NotImpl. I love this ability.

This is how it looks like:

image

Comments

alwin
11/26/2008 04:22 AM by
alwin

Posts like these make me want to use WPF. Too bad I'm stuck with WinForms for a while.

Posts like these also make me want to use NH Prof! ;)

Neil Mosafi
11/26/2008 02:48 PM by
Neil Mosafi

Are you using commands in WPF, or manually handling the clicks on the Menu Items?

If the MenuItem had a command (e.g. <menuitem), the command could expose a CanExecute handler which returns false. WPF would then automatically disable the MenuItem.

Ayende Rahien
11/26/2008 05:22 PM by
Ayende Rahien

Neil,

I am using commands, the problem is that those aren't attached to commands yet.

Neil Mosafi
11/26/2008 05:34 PM by
Neil Mosafi

Ahh cool... well I think if you just set the Command property then it will automatically disable itself. You can then Trigger on the Enabled property rather than using the Tag (not a fan of tags myself).

Anyway probably not worth changing now you've done the work already.

Comments have been closed on this topic.