0
我有一个web控件的一些属性set.Below是代码。自动调整WebControl的高度
在.CS文件:
webBrowser1.NavigateToString("<html><head></head><body bgcolor=#d5e1f3><p style=font-family:arial><font size=3><center>" + content + "</center></font></p></body></html>");
在XAML:
<Grid MinHeight="80"
Grid.Row="3"
Background="Red"
HorizontalAlignment="Stretch"
VerticalAlignment="Center">
<phone:WebBrowser Name="webBrowser1"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center"
MinHeight="80"
Foreground="Black" Width="Auto" Height="Auto"></phone:WebBrowser>
</Grid>
如果文字一行那么它不居中vertically.How解决这一问题?
嗯,谢谢你能告诉我任何一段代码,我可以添加它?或者你能帮我解决这个问题吗? – user2056563
我没有这样的代码,这是一个想法。你知道如何编写JavaScript代码吗?你知道如何从js调用C#代码吗? –
不知道该怎么做 – user2056563