C# Wpf webbrowser渲染问题
我有一个wpf页面,网格中有一个Web浏览器: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,可以用于进行一些测试 &
<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);
}