protected override void OnLayout(LayoutEventArgs eventArgs) { WorkflowView parentView = ParentView; using (Graphics graphics = parentView.CreateGraphics()) { if (parentView.RootDesigner != null) { try { ((IWorkflowDesignerMessageSink)parentView.RootDesigner).OnLayoutSize(graphics); } catch (Exception e) { //Eat the exception thrown Debug.WriteLine(e); } try { ((IWorkflowDesignerMessageSink)parentView.RootDesigner).OnLayoutPosition(graphics); } catch (Exception e) { //Eat the exception thrown Debug.WriteLine(e); } } } }
protected override void OnLayout(LayoutEventArgs eventArgs) { WorkflowView parentView = base.ParentView; using (Graphics graphics = parentView.CreateGraphics()) { if (parentView.RootDesigner != null) { try { ((IWorkflowDesignerMessageSink)parentView.RootDesigner).OnLayoutSize(graphics); } catch (Exception) { } try { ((IWorkflowDesignerMessageSink)parentView.RootDesigner).OnLayoutPosition(graphics); } catch (Exception) { } } } }