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