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

Cannot draw over the AvaloniaCefBrowser #181

Open
sakya opened this issue Nov 5, 2024 · 5 comments
Open

Cannot draw over the AvaloniaCefBrowser #181

sakya opened this issue Nov 5, 2024 · 5 comments

Comments

@sakya
Copy link

sakya commented Nov 5, 2024

It seems that is impossible to draw anything over the AvaloniaCefBrowser.

If you change the BrowserView.axaml like this

<UserControl xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Class="Xilium.CefGlue.Demo.Avalonia.BrowserView">

    <DockPanel>
        <TextBox x:Name="addressTextBox" DockPanel.Dock="Top" KeyDown="OnAddressTextBoxKeyDown" />
        <Grid>
            <Decorator x:Name="browserWrapper"/>

            <Border Width="300" Height="300" Background="Red"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center" />
        </Grid>
    </DockPanel>
</UserControl>

the border should be in front of the browser but it's not visible

OS: Windows 11

@joaompneves
Copy link
Collaborator

In order to be able to render anything on top, you need to enable WindowlessRendering:

https://github.com/OutSystems/CefGlue/blob/a5294071299a843bd556dd8b82243f655d78e95d/CefGlue.Demo.Avalonia/Program.cs#L27C27-L27C53

@sakya
Copy link
Author

sakya commented Nov 5, 2024

And what are the "more issues" in the comment that WindowlessRendering can cause? 😅

EDIT: with WindowlessRendering enabled it's impossible to write in the google search tetxbox

@joaompneves
Copy link
Collaborator

Seems you already found one "more issue". As stated its not recommended.

@sakya
Copy link
Author

sakya commented Nov 5, 2024

So it's impossible to implement JSDialogHandler without using an actual dialog window.
I wanted to just render a control (with a backdrop) over the browser.

@joaompneves
Copy link
Collaborator

you better create an actual window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants