Welcome Guest Search | Active Topics | Sign In | Register

set styles for the new window webview that is called from the new window Options
rentgen
Posted: Thursday, February 1, 2024 2:02:59 AM
Rank: Newbie
Groups: Member

Joined: 4/5/2022
Posts: 9
hi
I can’t understand why styles are not specified for the second window (popup), which is called from the first popup.
For the application itself and for the first popup, the styles work

Code: C#
options.UserStyleSheet = CssCode;
engine.Options.SetDefaultWebViewOptions(options);
webview.Engine = engine;
webview.Engine.Start();

code for the new window call event
Code: C#
private void WebView1_NewWindow(object sender, NewWindowEventArgs e)
        {                     
            Form popup = new Form
            {
                Text = Text,
...
            };
                      
            e.WebView.BeforeContextMenu += WebView1_BeforeContextMenu;
            e.WebView.NewWindow += WebView1_NewWindow;
            e.WebView.Closed += Webview_Closed;
            e.WebView.LoadCompleted += WebView1_LoadCompleted;
            e.WebView.IsReadyChanged += WebView1_IsReadyChanged;
            e.WebView.CertificateError += Webview_CertificateError;                        

            WebControl popupWebControl = new WebControl
            {
                Dock = DockStyle.Fill,
                WebView = e.WebView
            };

            popup.Controls.Add(popupWebControl);
            e.Accepted = true;
            popup.Show();
            
        }


eo_support
Posted: Thursday, February 1, 2024 11:26:11 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

We tested this on our latest build and it seems to work fine. Can you send us a full test project so that we can investigate further? See here for more information on sending test project to us:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.