Exemple #1
0
        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);
                    }
                }
            }
        }
Exemple #2
0
        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)
                    {
                    }
                }
            }
        }