title: WF4 While activity condition in code
body: <p>I am building a workflow in my code, and I don't know how I can add a simple (While) condition. Tried to figure out how, but no luck with it, search on the internet but no luck either.</p>
  
  <p>This is a simplified version of what I am trying to do:</p>
  
  <pre><code>ActivityBuilder ab = new ActivityBuilder();
  ab.Implementation = new Sequence()
  {
    Variables = 
    {
       new Variable&lt;int&gt;("StepNo", 0)
    },
  
    Activities =
    {
      new While()
      {
        Condition = &lt;the_condition&gt;
  
        Body = 
        {
          //Some logic here and the StepNo is increased
        }
      }
    }   
  }
  </code></pre>
  
  <p>The While condition should be something like "StepNo &lt; 10". Any idea how can this be made? </p>