title: Interface Object syntax in F#
body: <p>I'm translating C# code for multipage printing into F# . Could somebody tell me how to translate:</p>
  
  <pre><code>((IAddChild)page1Content).AddChild(page1)
  </code></pre>
  
  <p>context:</p>
  
  <pre class="lang-ml prettyprint-override"><code>       // printdia = printdialog
         // printdoc = printdocument
  
         // create a page
         let page1 = new System.Windows.Documents.FixedPage()
         page1.Width &lt;- printdoc.DocumentPaginator.PageSize.Width
         page1.Height &lt;- printdoc.DocumentPaginator.PageSize.Height
         page1.Children.Add(printcanvas) |&gt; ignore
         // add the page to the document
         let page1Content = new System.Windows.Documents.PageContent()
   (*C#*)((IAddChild)page1Content).AddChild(page1)
         printdoc.Pages.Add(page1Content) |&gt; ignore
         // and print
         printdia.PrintDocument(printdoc.DocumentPaginator, ordernr.Text);
  </code></pre>
  
  <p><a href="http://www.nbdtech.com/Blog/archive/2009/04/20/wpf-printing-part-2-the-fixed-document.aspx" rel="nofollow">Original code in C#</a></p>