Skip to main content

Windows Workflow : Dependency Property "does not define a static dependency property with name"

If you encounter the below exception while registering a DependencyProperty

"Error 103 Could not create activity of type 'xxxxxxxxxxxxxx'. System.ArgumentException: Type 'xxxxxxxxxx' does not define a static dependency property with name 'xxxxxxProperty'.
Parameter name: ownerType
   at System.Workflow.ComponentModel.DependencyProperty.ValidateAndRegister(String name, Type propertyType, Type ownerType, PropertyMetadata defaultMetadata, Type validatorType, Boolean isRegistered)
   at System.Workflow.ComponentModel.DependencyProperty.Register(String name, Type propertyType, Type ownerType)
   at xxxxx..cctor()"


If you are registering Dependency Property with name 'XYZ' then the declaration should be exactly like this,

public static DependencyProperty XYZProperty = DependencyProperty.Register("XYZ", typeof(bool), typeof(ApprovalWorkflow));
        public bool IsRestarted
            get { return ((bool)(GetValue(XYZProperty ))); }
            set { SetValue(XYZProperty , value); }

Variable name  should end with 'Property' and start with one passed to 'Register' method
VariableFormat Example  (<XYZ><Property>).

Please share your comments if it helps.


Malineni said…
Thanks Senthi...This helped me out to resolve the issue I had

Popular posts from this blog

Which Game Engine ?

Long Long ago ... so long ago I wrote blog.. After many months writing again. This time about Game Engines.

While I was learning during my school/college period, I want to make games using the language features alone. I never wanted to make a game using game engine. Somewhere in my mind I felt that using game engine is an inferior activity. I wanted to be a hard core guy!

As the time passes, game making becomes secondary and other tech stuffs like .net, web apps , db occupied my mindspace. When I later decided to quit my job and take up game development as my primary focus area, the first problem that came to me was Which Game Engine / No Game Engine?

That time I was little experienced, so ultimately my number of years in technology told me that going for Game Engine is the right way. Then comes the problem, Which Game Engine?

With the help of google, I came to know about the following game engines/frameworks. Unity, Unreal, LibGDX,GameMaker, SDL, Allegro, Mono...

Whole internet reco…

Tabs at the bottom of TabActivity

Tabs at the bottom of TabActivity
By default tabs in Android are displayed at the top. It is a general guideline for android developers to keep the tabs at top of the Tabs based application since lot of Android mobiles are having their home, back,search buttons or touch interface at the bottom

But its purely our decision :)

There are two ways to achieve this.
Using RelativeLayout Using "android:layout_weight" attibute  1) Using RelativeLayout: .xml will look like the following.
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android=""
        <FrameLayout android:id="@android:id/tabcontent"