Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Wpf webbrowser渲染问题_C#_Wpf_Internet Explorer_Webbrowser Control - Fatal编程技术网

C# Wpf webbrowser渲染问题

C# Wpf webbrowser渲染问题,c#,wpf,internet-explorer,webbrowser-control,C#,Wpf,Internet Explorer,Webbrowser Control,我有一个wpf页面,网格中有一个Web浏览器: <Grid Grid.Row="2"> <WebBrowser Name="browser" Margin="0" Grid.Row="2"/> </Grid> 可在此处找到代码: 我曾在几个案例中使用过web浏览器,而且一直都很好。这是我第一次想显示表 你知道为什么我的申请表上没有红色吗? 为什么会显示垂直滚动条?请添加表格css,可以用于进行一些测试请添加表格css,可以用于进行一些测试 &

我有一个wpf页面,网格中有一个Web浏览器:

<Grid Grid.Row="2">
        <WebBrowser Name="browser" Margin="0" Grid.Row="2"/>
</Grid>
可在此处找到代码:

我曾在几个案例中使用过web浏览器,而且一直都很好。这是我第一次想显示表

你知道为什么我的申请表上没有红色吗?
为什么会显示垂直滚动条?

请添加表格css,可以用于进行一些测试请添加表格css,可以用于进行一些测试
<table class="table table-striped table-condensed"><thead><tr><th><span class="h4">Ranking</span></th></tr></thead><tbody><tr class="active">
            <td>25617</td>
        </tr><tr>
            <td>10000</td>
        </tr><tr>
            <td>7877</td>
        </tr><tr>
            <td>6000</td>
        </tr><tr>
            <td>5750</td>
        </tr><tr>
            <td>5000</td>
        </tr><tr>
            <td>2501</td>
        </tr><tr>
            <td>1758</td>
        </tr><tr>
            <td>31</td>
        </tr><tr>
            <td>22</td>
        </tr></tbody></table>
   public static bool SetBrowserEmulationVersion()
    {
        int ieVersion;
        BrowserEmulationVersion emulationCode;

        ieVersion = GetInternetExplorerMajorVersion();

        if (ieVersion >= 11)
        {
            emulationCode = BrowserEmulationVersion.Version11;
        }
        else
        {
            switch (ieVersion)
            {
                case 10:
                    emulationCode = BrowserEmulationVersion.Version10;
                    break;
                case 9:
                    emulationCode = BrowserEmulationVersion.Version9;
                    break;
                case 8:
                    emulationCode = BrowserEmulationVersion.Version8;
                    break;
                default:
                    emulationCode = BrowserEmulationVersion.Version7;
                    break;
            }
        }

        return SetBrowserEmulationVersion(emulationCode);
    }