Geeks With Blogs


Locations of visitors to this page

View ► Sanjay Uttam []'s profile on LinkedIn

Add to Google Reader or Homepage

Sanjay Uttam Predominantly .NET

Until redesign of WF 4.0 is completed & released, I’m going to have to put up with this.  I’ve been working some WF stuff the past few days.  One of the very annoying things about working with the VS designer environment is, well, frankly – the designer.  It’s entirely inconsistent.  Sometimes, when I need to add a normal property (not a dependency property) – doing things the normal way gets me there.  In other words, I add this code to the activity code:

public int MyProperty { get; set; }

and in the designer (right click activity > properties > under “Misc”), I see what I’m supposed to see (umm..right? I’m supposed to see this??)


…and everything is right in the world.  Then, 10 minutes you take the identical steps, only with a new property and to your amazement, absolutely nothing happens and you’re left wondering if someone killed a butterfly in a rainforest or something.  Well, I have no idea what happened…but I can tell you that a restart of the IDE is what works for me.  Yep, that’s right…it’s the old Windows 98 solution to things.  Try it.

Now, the above scenario was with a “normal” property – not a dependency property.  Well, turns out the same thing can happen with dependency properties – which I was fortunate enough to have experienced yesterday.  I would assume the above restart-the-ide “solution” would work for that, as well.  In case it doesn’t, though, it turns out you can actually access dependency properties by doing this…It’s not that pretty – but it definitely works.

someLocalVarFoo = ((SourceNamespace.SourceClassName)this.GetActivityByName("ActivityName")).PropertyName;
Posted on Thursday, October 22, 2009 5:18 PM | Back to top

Copyright © Sanjay Uttam | Powered by: