【发布时间】:2010-10-14 18:05:13
【问题描述】:
我收到以下错误:
obj\Debug\StoryList.g.cs(40,22):错误 CS0102:类型 'Newsreader.StoryList' 已经包含一个定义 '_contentLoaded'
obj\Debug\StoryList.g.cs(46,21): 错误 CS0111:类型 'Newsreader.StoryList' 已经定义了一个名为 'InitializeComponent' 同 参数类型
这是 XAML:
<Grid x:Name="MyLayoutRoot" Background="Transparent">
<ScrollViewer d:LayoutOverrides="Height" HorizontalAlignment="Left" Width="424">
<StackPanel Height="865">
<local:StoryControl Height="206" HorizontalAlignment="Left">
<Custom:Interaction.Triggers>
<Custom:EventTrigger EventName="MouseLeftButtonDown">
<ic:NavigateToPageAction TargetPage="/StoryPage.xaml"/>
</Custom:EventTrigger>
</Custom:Interaction.Triggers>
</local:StoryControl>
<local:StoryControl Height="206" HorizontalAlignment="Left">
<Custom:Interaction.Triggers>
<Custom:EventTrigger EventName="MouseLeftButtonDown">
<ic:NavigateToPageAction TargetPage="/StoryPage.xaml"/>
</Custom:EventTrigger>
</Custom:Interaction.Triggers>
</local:StoryControl>
<local:StoryControl Height="206" HorizontalAlignment="Left">
<Custom:Interaction.Triggers>
<Custom:EventTrigger EventName="MouseLeftButtonDown">
<ic:NavigateToPageAction TargetPage="/StoryPage.xaml"/>
</Custom:EventTrigger>
</Custom:Interaction.Triggers>
</local:StoryControl>
<local:StoryControl Height="206" HorizontalAlignment="Left"/>
</StackPanel>
</ScrollViewer>
</Grid>
我在这里做错了什么?我正在复制/粘贴以创建新控件。这可能与它有关吗?
【问题讨论】:
标签: silverlight xaml expression-blend