chromelyapps / Chromely

Build Cross Platform HTML Desktop Apps on .NET using native GUI, HTML5, JavaScript, CSS, Owin, AspNetCore (MVC, RazorPages, Blazor)
MIT License
2.98k stars 279 forks source link

Blazor and/or MDI #148

Closed Vittitow closed 4 years ago

Vittitow commented 4 years ago

Can Blazor be used with Chromely in place of angular/react/view? Also, my use case for Chromely is to develop a cross platform web browser using a web framework for creating a custom sidebar and navbar driving CEF to load web pages. Essentially I would need two instances of CEF running in the same window, aka MDI. One for the sidebar and nav and one for the actual rendering of web content. Would this be possible? I think it could be done with WPF but I’d like for it to be cross platform if possible.

Thanks!

mattkol commented 4 years ago

@Vittitow yes you can use Blazor with Chromely. It is the same approach for angular/react/vue. Chromely only needs the published files and there must be an entry html file.

Chromely is designed for one CEF instance. You can achieve the MDI you want but will require a lot of work on your part. Any reason why usual Html/JavaScript/jQuery enabled Nav will not work in this scenario? You can take a look at the demos if that will help - an iframe is used to hold the content -

https://github.com/chromelyapps/demo-projects/blob/1cc118d55dafeb1762976dd65c0f6a2f0345a321/regular-chromely/CrossPlatDemo/app/chromely.html#L94

Vittitow commented 4 years ago

The html content I'll be rendering has to be in a parent window to cover all possible scenarios so an iframe wouldn't suffice unfortunately.

Any insights you could provide to get me started in the right direction for adding MDI support to chromely? Or a way to create some sort of ribbon/sidebar that would be cross platform unlike a possible WPF solution.

mattkol commented 4 years ago

The only way I know (On Windows) is to create 2 static controls. Those controls will be children of the main window. And then use the static controls as hosts to CEF.

But that is on Windows. I guess similar thing can be done for Linux (gtk) and MacOS (Cocoa API).