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




Answer this question

how to find the designer associated to an activity

  • Orenbutn

    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.

  • Reza Bemanian

    Thanks.

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



  • Rajavanya

    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



  • Pablo Orte

    IDesignerHost.GetDesigner will return the designer for any Activity.

  • Peter Lillevold

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



  • how to find the designer associated to an activity