试图弄清楚为什么我的silverlight应用程序在我运行它时突然什么都不显示(右键单击显示silverlight),而当我打开VS2010创建的html文档时也什么也不显示?
这突然发生了,我不知道为什么。我什至删除了我所有的代码,除了一个事件。
银光代码:
<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)
{
}
}