Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First load the workflow into the designer.</p> <p>You should already know the 'activity' you want highlighted. There is selection service in the workflow you can use to select the appropriate model items. This example shows single selection, but there is multiple.</p> <pre><code>ModelService modelService = wd.Context.Services.GetService&lt;ModelService&gt;(); IEnumerable&lt;ModelItem&gt; activityCollection = modelService.Find(modelService.Root, typeof(Activity)); Selection.Select(wd.Context, activityCollection.ElementAt(5)); </code></pre> <p>On the workflow designer there is a button to copy workflow as image or something along those lines. This link will show you how to get the jpg from the WorkflowDesigner.View. <a href="http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/b781c8df-608a-485a-80e3-a795d800f08d" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/b781c8df-608a-485a-80e3-a795d800f08d</a></p> <pre><code> const double DPI = 96.0; Rect size = VisualTreeHelper.GetDescendantBounds(view); int imageWidth = (int)size.Width; int imageHeight = (int)size.Height; RenderTargetBitmap renderBitmap = new RenderTargetBitmap(imageWidth, imageHeight, DPI, DPI, PixelFormats.Pbgra32); renderBitmap.Render(view); BitmapFrame bf = BitmapFrame.Create(renderBitmap); using (FileStream fs = new FileStream(@"c:\test.jpg", FileMode.Create)) { JpegBitmapEncoder encoder = new JpegBitmapEncoder(); encoder.Frames.Add(BitmapFrame.Create(bf)); encoder.Save(fs); fs.Close(); } </code></pre> <p>As an added note you should check out Kushals example: <a href="http://blogs.msdn.com/b/kushals/archive/2009/12/22/visualworkflowtracking-aka-workflowsimulator.aspx" rel="nofollow">http://blogs.msdn.com/b/kushals/archive/2009/12/22/visualworkflowtracking-aka-workflowsimulator.aspx</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload