public UserControl GetRender(ViewModel parent, Response r) { string filename = Path.GetTempFileName(); r.SaveToFile(filename); Uri baseUri = r.BaseUri; HtmlViewModel vm = new HtmlViewModel(parent, filename); return new HtmlRender(vm, baseUri); }
public HtmlRender(HtmlViewModel vm, Uri baseUri) { InitializeComponent(); DataContext = vm; Browser.LoadCompleted += Browser_LoadCompleted; }