title: Is it appropriate to cast ContentPresenter.Content to UIElement?
body: <p>Are there any situations where the content of a <code>ContentPresenter</code> will be some object other than a <code>UIElement</code>? Given that the field is declared as object rather than a <code>UIElement</code>, it seems possible that there would be. However, I cannot think of any situations where it would be, or even if it would be valid.</p>
  
  <pre><code>ContentPresenter presenter = GetTemplateChild(PART_Presenter) as ContentPresenter;
  UIElement myElement = (UIElement)presenter.Content;
  myElement.SomeUIMethod(); // possible InvalidOperationException?
  </code></pre>