Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi everyone, I'm devoliping a simple app,or better, I've developed a simple app, it all works fine, but I don't know why in VS2010 this piece of code is marked as "incorrect XAML" when I open the page on the designer.
I repeat, it all works fine, compile and Deploy, but the designer says there's some errors in XAML
 
Here's the code, any idea?
 
<Grid x:Name="LayoutRoot">
        <ListBox Height="499" HorizontalAlignment="Left" Name="lstPeople" VerticalAlignment="Top" Width="480" SelectionChanged="lstPeople_SelectionChanged">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel x:Name="stackPanelPeopleList" Orientation="Vertical" >
                        <TextBlock HorizontalAlignment="Left" Foreground="{StaticResource PhoneForegroundBrush}" FontSize="30" Text="{Binding Nome}"/>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                            <TextBlock Margin="0,0,10,0" FontSize="25" Text="{Binding Path=LocalizedResources.QuotaLabel, Source={StaticResource LocalizedStrings}}" Foreground="LightBlue"/>
                            <TextBlock Margin="0,0,10,0" FontSize="25" Text="{Binding QuotaVersata}" Foreground="{StaticResource PhoneForegroundBrush}"/>
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>        
    </Grid>
 
The problems appears to be in tag and all the lines after that...
Posted 1-Dec-12 1:29am
dome87301
Comments
Christian Amado at 7-Dec-12 6:33am
   
Are you using any third-party control on your Silverlight Project?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This usually happens when you use Static Resources in seperate resource dictionaries.
I am not exactly sure why visual studio has a moan about it.
 
Sometimes I have managed to get around it by cleaning the project, and in some situations removing the bin and obj folders.
 
Most of the time though, I just set the designer off and carry on and let the compiler let you know if its broken.
  Permalink  
Comments
IndifferentDisdain at 11-Jan-13 16:51pm
   
Yep, I get that all the time. VS2012 seems to do a lot better job at that, though it has its own oddities like losing references in IntelliSense to classes/methods in other namespaces. So, for a while, I'd work on one solution with both VS2010 and 2012 simultaneously. So much fun.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 450
1 OriginalGriff 403
2 CPallini 189
3 Sergey Alexandrovich Kryukov 189
4 CHill60 180
0 OriginalGriff 6,092
1 Sergey Alexandrovich Kryukov 4,958
2 Maciej Los 3,269
3 Peter Leow 3,129
4 DamithSL 2,490


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 7 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100