how to find the designer associated to an activity

I have an activity and need to know, whether it is drawn below a given designer or above it.

How can I get a reference to the designer, that is associated with an activity to get access to the Location information?

The designer class has an Activity attribute, but Activities do not have a Designer attribute. Perhaps a good suggestion for the next release?

[379 byte] By [mario.muja] at [2007-12-24]
# 1

Of course, instead of "Activity attribute" and "Designer attribute", I mean "Activity property" and "Designer property".

mario.muja at 2007-8-31 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2
IDesignerHost.GetDesigner will return the designer for any Activity.
JonFlanders at 2007-8-31 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3

Thanks.

How can I get an implementation of the IDesignerHost from within an activity?

mario.muja at 2007-8-31 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 4
You can't - but you should be able to from an ActivityDesigner - which is where you'd want to do anything like this anyway. IDesignerHost is a service you should be able to get from any IServiceProvider through GetService.
JonFlanders at 2007-8-31 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 5

Thanks for your help.

I am in an activities code and now want it to be repainted, because its state has been changed.

If it is not possible to get the designer associated to an activity from within the activity, how can I then inform the associated designer to invalidate?

I do not understand, why it is so difficult to get access to the designer associated to an activity. Could'nt there be simply a Designer property available for each activity?

mario.muja at 2007-8-31 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified