Silverlight アプリを実行すると突然何も表示されず (右クリックで Silverlight が表示される)、VS2010 で作成された html ドキュメントを開いたときに何も表示されない理由を理解しようとしていますか?
これは突然のことで、原因がわかりません。イベント以外のコードビハインドもすべて削除しました。
Silverlight コード:
<UserControl x:Class="Test.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="395" d:DesignWidth="399"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
<Grid x:Name="LayoutRoot" Background="White">
<Image Height="96"
HorizontalAlignment="Left"
Margin="55,34,0,0"
Name="image1"
Stretch="Fill"
VerticalAlignment="Top"
Width="71" />
<Image Height="96"
HorizontalAlignment="Left"
Margin="155,34,0,0"
Name="image2"
Stretch="Fill"
VerticalAlignment="Top"
Width="71" />
<Image Height="96"
HorizontalAlignment="Left"
Margin="257,34,0,0"
Name="image3"
Stretch="Fill"
VerticalAlignment="Top"
Width="71" />
<Image Height="96"
HorizontalAlignment="Left"
Margin="55,270,0,0"
Name="image4"
Stretch="Fill"
VerticalAlignment="Top"
Width="71" />
<Image Height="96"
HorizontalAlignment="Left"
Margin="155,270,0,0"
Name="image5"
Stretch="Fill"
VerticalAlignment="Top"
Width="71" />
<Image Height="96"
HorizontalAlignment="Left"
Margin="257,270,0,0"
Name="image6"
Stretch="Fill"
VerticalAlignment="Top"
Width="71" />
<Button Content="Draw/Next"
Height="23"
HorizontalAlignment="Left"
Margin="155,159,0,0"
Name="button1"
VerticalAlignment="Top"
Width="71" />
<sdk:Label Height="43"
HorizontalAlignment="Left"
Margin="33,173,0,0"
Name="label1"
VerticalAlignment="Top"
Width="44"
Content=""
FontSize="32" />
<sdk:Label FontSize="32"
Height="43"
HorizontalAlignment="Right"
Margin="0,173,52,0"
Name="label2"
VerticalAlignment="Top"
Width="44"
Content="" />
<Button Content="Restart"
Height="23"
HorizontalAlignment="Left"
Margin="155,217,0,0"
Name="button2"
VerticalAlignment="Top"
Width="71"
Click="button2_Click" />
</Grid>
</UserControl>
コードビハインド:
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
private void button2_Click(object sender, RoutedEventArgs e)
{
}
}