Ayende @ Rahien

Hi!
My name is Ayende Rahien
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 5,949 | Comments: 44,548

filter by tags archive

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

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

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

Neil,

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

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.

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

No future posts left, oh my!

RECENT SERIES

  1. The RavenDB Comic Strip (3):
    28 May 2015 - Part III – High availability & sleeping soundly
  2. Special Offer (2):
    27 May 2015 - 29% discount for all our products
  3. RavenDB Sharding (3):
    22 May 2015 - Adding a new shard to an existing cluster, splitting the shard
  4. Challenge (45):
    28 Apr 2015 - What is the meaning of this change?
  5. Interview question (2):
    30 Mar 2015 - fix the index
View all series

RECENT COMMENTS

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats