views:

10

answers:

1

I'm getting the following errors:

obj\Debug\StoryList.g.cs(40,22): error CS0102: The type 'Newsreader.StoryList' already contains a definition for '_contentLoaded'

obj\Debug\StoryList.g.cs(46,21): error CS0111: Type 'Newsreader.StoryList' already defines a member called 'InitializeComponent' with the same parameter types

Here is the 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>

What could I be doing wrong here? I was copying/pasting to create new controls. Could that possibly have something to do with it?

A: 

do you happen to have a '_contentLoaded' and 'InitializeComponent' defined elsewhere in Newsreader.StoryList (e.g. in StoryList.cs)?

If you open StoryList.g.cs and look at the generated code, you might be able to see the problem there.

KeithMahoney