Last Saturday at the Jax Code Camp,I gave a session on building custom workflow activities. During the last part of the session, I was having some trouble compiling my activity which was supposed to show how to validate custom properties. I thought I had everything working the night before, but I changed something at the last minute. Here is what I did...
- Declared my dependency properties
- Declared my actual properties
- Built my class that extends ComponentModel.Compiler.ActivityValidator
My three properties were simple ones... FirstName, LastName and Age, however I wanted to show what happens at design time if data is either forgotten or invalid. Somehow I had removed the PropertyMetaData parameters to the dependancy properties. My validator class was then trying to validate that I had a first/last name and that the age property was not