title: Create line use BoxView in Xamarin Forms
body: <p>I need to create a line which is a made up of multiple <code>BoxView</code>s (<code>WidthRequest=0.20830</code> and <code>HeightRequest=5</code> for every <code>BoxView</code>). There will be 1440 <code>BoxView</code>s in a sequence arranged in way that it will create a line(approximately  <code>WidthRequest=300</code>).</p>
  
  <p>My Code -</p>
  
  <pre><code>public partial class timeManagement : ContentPage
  {
      double oneMinute=0.20833333;
      public timeManagement ()
      {
          InitializeComponent ();
          StackLayout stack = new StackLayout{Orientation=StackOrientation.Horizontal,                
          };
  
          for(int i=1;i&lt;=14;i++)
          {
              BoxView piece_ofLine = new BoxView
              { 
                  HeightRequest=5,
                  WidthRequest=5,
                  Color=Color.Red
              };
  
              if (i &gt;= 5 &amp;&amp; i &lt;= 9) {
                  stack.Children.Add (piece_ofLine);
                  piece_ofLine.Color = Color.Green;
              } else {
                  stack.Children.Add (piece_ofLine);
                  piece_ofLine.Color = Color.Red;
              }
  
          }
  
  
          Content = new StackLayout {
              Padding =50, 
              Spacing=0,
  
              Children = {
                  stack
              }
          };
  
      }
  }
  </code></pre>
  
  <p>And output is-<a href="https://i.stack.imgur.com/sa7Kh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sa7Kh.png" alt="enter image description here"></a></p>
  
  <p>But I want all boxes side by side so it will appear like a single line.</p>