I'm creating a desktop Winforms or WPF app, but I'm using HTML/JS/CSS to create UI. So the simpliest solution is using a Web Browser control in a host window.
I want an absolute transparent web browser control now.
For example, I have DIV with 50% transparency, then I should see the Windows desktop icons through the DIV (The host form and web browser control should be transparent).
Is it possible?
Here are several possibilities
If you do not care about the size of browser window, you can set the Width and Height to 0.
If you want to have a specified browser window size, you can set the Left equals -Width and Top equals -Height.
Set the Parent of browser control to Null, so that the browser control will become invisible as well.
I prefer the second solution.
Related
I am using a WebView2 control in a WPF application to show a PDF to the user
This is normally displayed with a nice little toolbar, all part and parcel of rendering a PDF in a WebView2 control, allowing the user to navigate to other pages, zoom in or out, rotate, etc.
However, we found that as the window gets a bit narrower at some point this toolbar simply disappears. Is there something we can do to stop this happening?
As the available space for the PDF toolbar shrinks the PDF toolbar shows fewer and fewer controls. This is also true in the browser. However, in the browser the minimum horizontal width of the browser window is a value at which the PDF toolbar is still visible.
I'm not sure if this behavior is by design or not. You can try opening a bug report about this on the WebView2 feedback repo.
How to disable resizing the browser in Silverlight application
You can't and nor should you be able to. The browser is an application that belongs to the user, it is not something that your application should allowed to take charge of.
If you want to prevent the resizing of your Silverlight content then specify a fixed width and height for the <object> tag in the html hosting the Silverlight plugin.
i am adding html to silverlight's web browser control .what i want is ,
web browser control always navigated to the bottom and
web browser control to show horizontal and vertical bar.
thanks
jamal.
I am creating a page with Silverlight component and some HTML controls.
On enabling Silverlight's full screen, I am unable to view the background HTML controls. Even if I set the xaml's background to transparent.
Please let me know if it's possible to view the HTML controls in full screen mode of Silverlight or not.
Thanks
I doubt that such thing is possible, for security reasons, as the keybordsupport in Fullscreen is. It would enable you create such things as a app totally visible observing the movements.
But I might be wrong !
Fullscreen mode takes the content currently restricted to rectangle on hosts window (the Browser client area window) and displays it on full screen window. This full screen window is a new window and contains only the Siverlight content.
When silverlight is rendering in a windowless mode it is simply rendering directly on to the host window. When you got fullscreen mode in Silverlight you are not affecting the hosts window, fullscreen effectively suppends windowless mode as it needs a new window of its own to render on.
I would like place a silverlight contol on an HTML page --- something about the size of a typical calendar control. However when the user selects a day on the control a bigger canvas opens up on top of the containing page --- something like a modal dialog box that you might find with the AJAX.
I'm wondering if this is even possible with Silverlight, or is the silverlight content limited in size to the DIV element on the host page?
UPDATE: after doing some poking around, I think the answer will involve using the ChildWindow control introduced with Silverlight 3. However I'm still at a loss how to have the ChildWindow display ontop of the existing content
I know one way, you will need javascript event on the page itself to expand a silverlight object to fit the whole page then build you silverlight event accordingly.