private void AddWorkflowDesigner()
        {
            this.WorkflowDesigner = new WorkflowDesigner();
            this.DebuggerService  = this.WorkflowDesigner.DebugManagerView;

            this.WorkflowDesigner.Load("Workflow.xaml");

            this.RehostGrid.Children.Add(this.WorkflowDesigner.View);
        }
        public void AddWorkflowDesigner()
        {
            this.WorkflowDesigner = new WorkflowDesigner();
            this.WorkflowDesigner.Context.Services.GetService <DesignerConfigurationService>().AutoConnectEnabled = true;

            this.WorkflowDesigner.Context.Services.GetService <DesignerConfigurationService>().PanModeEnabled = true;
            this.WorkflowDesigner.Context.Services.GetService <DesignerConfigurationService>().MultipleItemsDragDropEnabled      = true;
            this.WorkflowDesigner.Context.Services.GetService <DesignerConfigurationService>().LoadingFromUntrustedSourceEnabled = true;
            this.WorkflowDesigner.Context.Services.GetService <DesignerConfigurationService>().TargetFrameworkName = new System.Runtime.Versioning.FrameworkName(".NETFramework", new Version(4, 5));
            this.DebuggerService = this.WorkflowDesigner.DebugManagerView;

            this.WorkflowDesigner.Load(WorkflowFilePath);
            this.workflowDesignerPanel.Content = this.WorkflowDesigner.View;

            //Updating the mapping between Model item and Source Location as soon as you load the designer so that BP setting can re-use that information from the DesignerSourceLocationMapping.
            wfElementToSourceLocationMap = UpdateSourceLocationMappingInDebuggerService();
            txtFilename.Text             = WorkflowFilePath;
        }
        public void Run()
        {
            this.workflowDesigner.Flush();

            this.debuggerService = this.workflowDesigner.DebugManagerView;

            StatusViewModel.SetStatusText(Resources.DebuggingStatus, this.workflowName);

            this.sourceLocations             = new List <SourceLocationDebugItem>();
            this.textLineToSourceLocationMap = new Dictionary <int, SourceLocation>();
            this.sourceLocationSteppedCount  = 0;

            try
            {
                this.LoadAndExecute();
            }
            catch (Exception e)
            {
                this.output.WriteLine(ExceptionHelper.FormatStackTrace(e));
                StatusViewModel.SetStatusText(Resources.ExceptionInDebugStatus, this.workflowName);
                this.running = false;
            }
        }
        public void Run()
        {
            this.workflowDesigner.Flush();

            this.debuggerService = this.workflowDesigner.DebugManagerView;

            StatusViewModel.SetStatusText(Resources.DebuggingStatus, this.workflowName);

            this.sourceLocations = new List<SourceLocationDebugItem>();
            this.textLineToSourceLocationMap = new Dictionary<int, SourceLocation>();
            this.sourceLocationSteppedCount = 0;

            try
            {
                this.LoadAndExecute();
            }
            catch (Exception e)
            {
                this.output.WriteLine(ExceptionHelper.FormatStackTrace(e));
                StatusViewModel.SetStatusText(Resources.ExceptionInDebugStatus, this.workflowName);
                this.running = false;
            }
        }