title: Understanding WidthRequest
body: <p>I want to change the <a href="https://developer.xamarin.com/api/property/Xamarin.Forms.VisualElement.WidthRequest/" rel="noreferrer"><code>WidthRequest</code></a>. Thereby I noticed that this doesn't really set the <em>width</em> of an element. Rather it is kind of a proposal.</p>
  
  
  
  <p>Example:
  I have a <code>ListView</code> added as child to a <code>StackLayout</code>. I'm setting a <code>WidthRequest</code> for the <code>ListView</code>, but the result is not what I expect.</p>
  
  <pre class="lang-cs prettyprint-override"><code>this.listView = new ListView
  {
      ItemsSource = new List&lt;IconMenu&gt;
      {
          // creation of some entries
          // ...
      },
      ItemTemplate = new DataTemplate(typeof(IconMenuCell)),
      RowHeight = 44,
      // HERE is the problematic code!
      WidthRequest = 10,
  };
  
  Content = new StackLayout
  {
      Orientation = StackOrientation.Horizontal,
      Children = {
          this.listView,
          this.detailView,
      },
  };
  </code></pre>
  
  <p>This is the structure/layout of <code>IconMenuCell</code>:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public IconMenuCell()
  {
      var icon = new Image
      {
          Aspect = Aspect.AspectFit,
          WidthRequest = 40,
      };
      icon.SetBinding(Image.SourceProperty, "IconSource");
  
      this.textLabel = new Label {
          TextColor = Color.Gray,
          FontSize = 10,
          VerticalOptions = LayoutOptions.Center,
      };
      this.textLabel.SetBinding(Label.TextProperty, "Text");
  
      View = new StackLayout
      {
          Orientation = StackOrientation.Horizontal,
          Children =
          {
              icon,
              this.textLabel,
          },
      };
  }
  </code></pre>
  
  <p>Setting the <code>WidthRequest</code> to 10 doesn't make sense, because the icon itself should take 40. But here I get the smallest width for the whole list view.</p>
  
  <p>There is no difference if I set <code>WidthRequest</code> to 60 or 120. The resulting width is the same (and not what I want).</p>
  
  <p>How does <code>WidthRequest</code> work here? Do I have to change some <code>LayoutOptions</code>?</p>