Skip to content

Using same instance of CefSharp browser across all view models in MVVM architecture #4688

Answered by amaitland
Dineshsing asked this question in Q&A
Discussion options

You must be logged in to vote

It's unlikely you'd be able to set LegacyBindingEnabled in a ViewModel, it needs to be set before the underlying CEF browser is created and cannot be changed after.
Subclassing ChromiumWebBrowser and setting the value in the constructor is likely the only option currently.

As I've discussed in #3609 you probably cannot set this in the ViewModel. You'll need to set it in the View, code behind is one option, or create your own class inheriting from ChromiumWebBrowser as I've suggested above.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Dineshsing
Comment options

@amaitland
Comment options

Answer selected by Dineshsing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants