title: Is there a way to make a NativeScript GridLayout with a fixed aspect ratio?
body: <p>First of all, I'd like to apologize if I fail to comply with any SO rules, as it's my first question.</p>
  
  <p>What I'm trying to acomplish, is having a <strong>square</strong> gridLayout in my page. The behavior should be equivalent to having an  element with stretch="aspectFit". </p>
  
  <p>If the suggested solution could let me enforce <strong>any given aspect ratio</strong> instead of just a square one, it would be a nice plus, because it would allow me to solve multiple situations in the future. Or if it could be applied to any Layout element, it would also be nice. </p>
  
  <p>The solution can be as hacky as desired, and the GridLayout can be nested in any way you need to acomplish this. </p>
  
  <p>I have already tried to hack it like this:</p>
  
  <pre><code> &lt;GridLayout rows="*,auto,*" columns="*,auto,*" backgroundColor="green"&gt;
    &lt;Image row="1" col="1" src="~/Images/1px-black.png" stretch="aspectFit" width="100%"&gt;&lt;/Image&gt;
    &lt;StackLayout row="1" col="1" orientation="vertical" backgroundColor="lightgray"&gt;
      &lt;Label text="Label 1" width="100%" height="25%" backgroundColor="red"&gt;&lt;/Label&gt;
      &lt;Label text="Label 2" width="100%" height="25%" backgroundColor="green"&gt;&lt;/Label&gt;
      &lt;Label text="Label 3" width="100%" height="25%" backgroundColor="blue"&gt;&lt;/Label&gt;
      &lt;Label text="Label 4" width="100%" height="25%" backgroundColor="yellow"&gt;&lt;/Label&gt;
    &lt;/StackLayout&gt;
  &lt;/GridLayout&gt;
  </code></pre>
  
  <p>Visually it seemed to work, but the contents of the GridLayout didn't fill it apropriately</p>
  
  <p>PS: I just noticed in the example I chose, the layout element I am trying to make square is the nested StackLayout, but it's the same idea. I need a way to make a nested layout element squared.</p>