Activity custom drawing does not work
Hi,
I have written the custom activity code shown below. It should show a red line drawn across the activity rectangle. However, the line is not drawn. The activity appears as a white rectangle.
Can someone please explain how I can completely control the drawing of my activities? I have looked at the WorkflowDesignerControl example from MSDN. It seems to also do no more than overwriting the Paint event.
Regards, Mario
[
Designer(typeof(PanedActivityDesigner),typeof(IDesigner))]public
classPanedActivity : System.Workflow.ComponentModel.Activity{
}
public
classPanedActivityDesigner : System.Workflow.ComponentModel.Design.ActivityDesigner{
protectedoverridevoid OnPaint(ActivityDesignerPaintEventArgs e){
Pen p =newPen(Color.Red);e.Graphics.DrawLine(p,
newPoint(0, 0),newPoint(30, 20));}
}

