admin管理员组

文章数量:1391999

I have the follwing app.

    public partial class Form1 : Form
    {
        private Microsoft.Web.WebView2.WinForms.WebView2 mBrowser = new Microsoft.Web.WebView2.WinForms.WebView2();

        public Form1()
        {
            InitializeComponent();

            string webContent = "C:\\Users\\username\\AppData\\Local\\Temp\\CommonNavigation.html";

            mBrowser.AllowExternalDrop = true;
            mBrowser.CreationProperties = null;
            mBrowser.Dock = DockStyle.Fill;
            mBrowser.Name = "webView";
            mBrowser.TabIndex = 0;
            mBrowser.ZoomFactor = 1D;
            mBrowser.Source = new Uri(webContent);

            flyoutPanel1.OwnerControl = this;
            flyoutPanel1.Options.AnchorType = DevExpress.Utils.Win.PopupToolWindowAnchor.Manual;
            flyoutPanel1.Options.CloseOnOuterClick = true;
            flyoutPanelControl1.Controls.Add(mBrowser);
            flyoutPanel1.Size = new Size(300, this.Height - 100);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            flyoutPanel1.ShowPopup();
        }
    }

When I run this, and I click the button, I see the flyout and the content. I click on a button in the content and it reacts correctly. See below GoodRendering But if I change the height value of 100 to 50 in flyoutPanel1.Size; and I click the same button on the content; I get this BadRendering

Any help is appreciated.

Searched all over for WebView2 examples. Be able to show the content properly on WebView2

本文标签: