Windows Phone 7用のWebブラウザーアプリで、グリッド上にWebブラウザーコントロール(xaml.cs)を作成しました。その後、グリッド上に画像を作成しました。しかし、エミュレーターでWebブラウザーを開くと、その画像は表示されません。タブ付きのブラウザです。ただし、画像はグリッドには表示されますが、Webブラウザーコントロールには表示されません(アプリのデバッグ後)。UCブラウザのようにこれがあります。以下の画像をご覧ください。グリッド上では画像は表示されますが、Webブラウザコントロールでは画像は表示されません。
.xamlで
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBox x:Name="UrlTextBox" Background="White" InputScope="URL" KeyDown="UrlTextBox_KeyDown" Margin="0,0,98,0" GotFocus="UrlTextBox_GotFocus" LostFocus="UrlTextBox_LostFocus" KeyUp="UrlTextBox_KeyUp"/>
<Grid x:Name="BrowserHost"
Grid.Row="1" GotFocus="BrowserHost_GotFocus">
<Image x:Name="Full" Source="Images/full.png" Height="60" Width="60" Margin="430,678,0,0" MouseEnter="Full_MouseEnter" Visibility="Visible" />
</Grid>
Xaml.csで
private void ShowTab(int index)
{
this.currentIndex = index;
UrlTextBox.Text = this.urls[this.currentIndex] ?? "Search";
if (this.browsers[this.currentIndex] == null)
{
WebBrowser browser = new WebBrowser();
this.browsers[this.currentIndex] = browser;
BrowserHost.Children.Add(browser);
browser.IsScriptEnabled = true;
}
for (int i = 0; i < NumTabs; i++)
{
if (this.browsers[i] != null)
{
this.browsers[i].Visibility = i == this.currentIndex ? Visibility.Visible : Visibility.Collapsed;
}
}
}
Webブラウザコントロールにその画像が必要です。誰か助けてもらえますか?
よろしくお願いします!