title: Modify marginBottom xamarin C# programmatically
body: <p>I have a problem and was wondering if anyone here could help!</p>
  
  <p>I'm working on an app and I want the UI to change depending on screen size.
  For example:</p>
  
  <pre><code>    if (heightInPixels == 1000)
      {
          ProgressBar.LayoutParameters.Width = 292; 
          ProgressBar.LayoutParameters.Height = 292;
      }
  </code></pre>
  
  <p>This works fine and changes the progress bar dimensions. However, I can't seem to find a way to change an EXISTING<code>marginBottom</code> property. This property is inside a <code>RelativeLayout</code> and I can only find solutions for <code>LinearLayout</code>.</p>
  
  <p>I have a <code>RelativeLayout</code> called <code>RelativeLayoutHeader</code> and I've tried several things that I read here so far, like:</p>
  
  <pre><code>RelativeLayoutHeader.Bottom = 15 //don't know what happens, nothing apparently
  
  RelativeLayoutHeader.layoutParams.addRule(...) //layoutParams does not contain a def for...)
  
  FrameLayout.LayoutParams imgViewParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WrapContent, FrameLayout.LayoutParams.WrapContent, 0.0f);
      imgViewParams.SetMargins(10, 10, 10, 10); //does not work because i have a coordinatorLayout.
  </code></pre>
  
  <p>I'm new to Xamarin, sorry if I didn't explain my problem correctly. Thanks in advance and have a nice day.</p>