Wednesday, February 13, 2008

I'm working on a sweet project at the moment using both WPF and WF. One of my custom activities has a property of type Type, where it would be cool for the user of the activity to be able to use the designer to select a type, just like what happens in the WF designer when I choose a type. However, no type picker popped up.

So I went googling and found that Daniel Cazzulino also ran into this problem and created a fantastic little project to harness the power of the real WF typebrowser. He writes about it on this blogpost and later moves the project to code project. You can find the article and his download code here.

However, as you can read in the comments, something was broken. Looking through the code, although small, made me not want to waste time on understanding the System.ComponentModel namespace in that much detail at this point ;-) (although, when working with WF, you will soon need to customize property pickers, so I will have to look into it someday soon).
Daniel himself points to the Patterns and Practises entlib library: they offer the same functionality. I downloaded their sourcecode, and I'm quite sure they just used Daniels code and improved upon it a bit. However, with all the Entlib references, the project felt a bit heavy.

What I have done is rip out all the references to entlib that I do not care about, used a few files from Daniels original solution and worked around a few shortcomings. Nothing fancy, I just hacked at it until it worked.

image

 

Now, since I have used some code (without license) by Daniel and code by the Entlib group, I'm not sure if I can publish a derivative without getting into problems. However, I've read their license, and I think it's okay.

You can download the project here, don't ask for changes because I'm not interested in spending more time on it. All credits go to Daniel.

(Also, find out how to create your own typefilters in his post).

Have fun with it. Leave a comment if you find it useful.

Wednesday, February 13, 2008 8:24:47 PM (Romance Standard Time, UTC+01:00)
Holy !@#!@#! it works!

So I've been subscribed to the thread you responded to for over 6 months and finally somebody got it to work! Many kudos and thanks. Normally I'd be interested in the code and how it all works, but this was such a freaking annoying problem for me that I'm just going to use it out-of-the-box!

Freaking amazing!
Wednesday, February 13, 2008 10:30:12 PM (Romance Standard Time, UTC+01:00)
thnx!!
Ruurd
Wednesday, February 13, 2008 11:40:33 PM (Romance Standard Time, UTC+01:00)
Argh! Am I correct that it doesn't support generic types using the advanced tab out of the box?

I did a bit of coding and almost got it to work by creating my own DesignerTransaction object, but can't get the OK button to become enabled.

Have you tried to use it to set a generic type?

Even if you didn't try that part and it doesn't work for you, still excellent work. I could never get Daniel's to work properly and the ent lib one was too heavy and difficult to implement.
Thursday, February 14, 2008 12:24:50 AM (Romance Standard Time, UTC+01:00)
Sorry, haven't tried it and do not need it for my usecase.
I am able to see the advanced tab and use the ellipses to get another type selector. But when I choose my generic type, I get a not implemented exception. That is perfectly reasonable, since both Daniels as the P&P's implementation work with dummy objects that throw all kinds of exceptions.

I'd look into those. Try to find out which one it is and give a proper implementation
Ruurd
Thursday, February 21, 2008 3:12:00 PM (Romance Standard Time, UTC+01:00)
The download is broken - the WorkflowLibrary1 project is missing.
Richard
Thursday, February 21, 2008 3:16:35 PM (Romance Standard Time, UTC+01:00)
Removing the references to the missing WorkflowLibrary1 project, and the "using" directive from UserControl1 seems to fix it.
Richard
Thursday, February 21, 2008 3:37:32 PM (Romance Standard Time, UTC+01:00)
sorry, hadn't noticed.
Ruurd
Saturday, December 04, 2010 2:42:06 AM (Romance Standard Time, UTC+01:00)
In prehistoric days skins or hides have been probably tied near the foot for protection and warmth. The sandal, probably the earliest sort of footwear, was worn in Egypt, Greece, and Rome; an early form for the boot was also recognized in Greece and Rome.
Saturday, December 04, 2010 2:49:10 AM (Romance Standard Time, UTC+01:00)
The 3 rd social gathering piece of research websites may also provide software programs which produces completing these surveys a click with the mouse. In lieu of filling surveys single as a result of the opposite, this computer software will fill the survey which includes a just click of your respective mouse determined by your preferences. It is actually this technique that majority of paid for study takers use to create bucks on the net working with given surveys with none headache.
Comments are closed.