Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made an MVVM friendly example. #30

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ private static void OnHtmlChanged(DependencyObject d, DependencyPropertyChangedE
{
return;
}

(d as ChromiumWebBrowser)?.LoadHtml((string)e.NewValue, "http://test/page");
(d as LoadHtmlBehavior)?.AssociatedObject.LoadHtml((string)e.NewValue, "about:blank");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HtmlUrl property isn't being used. Also best not o use about:blank, as it's a special case. You'd be effectively registering a ResourceHandler that gets loaded every time about:blank is required.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see...so "http://test/page" is a better fit?

Should we add a new method to load an HTML directly through one parameter?

Could you explain me briefly the intent of the LoadHtml with an URL?

}
}
}