Something like this:
Code: Select all
public partial class PageControl : UserControl
{
public PageControl()
{
CSharpXamlForHtml5.DomManagement.SetHtmlRepresentation(this,
"<div class='main'><!-- content container --></div>");
this.Content = new Label() { Content = "Hello, world!" }; // throws an exception
}
}
or this:
Code: Select all
public partial class PageControl : UserControl
{
public PageControl()
{
this.Loaded += PageControl_Loaded;
}
private void PageControl_Loaded(object sender, RoutedEventArgs e)
{
Interop.GetDiv(this).Content = new Label() { Content = "Hello, world!" }; // does not compile
}
}
ie: I have a very simple html & css layout that I want to fill with CSHTML5 controls. How do I insert a CSHTML5 control into a native html element.