title: Creating a custom view using a xib
body: <p>Using MonoTouch, I'm trying to make a custom view, so I can reuse this view multiple times in a screen. (it's a bunch of labels and buttons)
  After reading the answer to this post:
  <a href="https://stackoverflow.com/questions/9857558/how-to-add-a-custom-view-to-a-xib-file-defined-view-in-monotouch">How to add a custom view to a XIB file defined view in monotouch</a>
  I must be getting close, but this only seems to allow me to add a custom view, defined in in myCustomView.CS, but what I'm looking for is a way to use a separate .XIB to design my custom view in the interface builder and only use the corresponding cs-file to add logic.
  If I try to make a XIB with the same name, the contents won't become visible.</p>
  
  <p>Followed steps:</p>
  
  <ul>
  <li><p>In MyCustomView.CS I have put <code>[Register("MyCustomView")]</code> .</p></li>
  <li><p>I implemented the constructor <code>public MyView(IntPtr handle) : base(handle) {}</code></p></li>
  <li><p>Open ViewController.XIB in Interface Builder, add a UIView and set it's Class to MyCustomView.</p></li>
  </ul>
  
  <p>When I run this code, I see the newly added UIView, but not the elements inside of the view, i.e. the contents of MyCustomView.XIB</p>
  
  <p>If I add something to the code of MyCustomView.CS, like <code>this.Backgroundcolor = UIColor.Blue;</code> this is displayed, but any elements added to the .XIB are not. How do I tell Monotouch to display all the stuff defined inside MyCustomView.XIB?</p>
  
  <p>In Objective-C samples I see stuff like "initWithNib"
  Unfortunately the "LoadNib" section is not documented in in the Monotouch api, but that sounds like something I should do, but how and where?</p>