Click here to Skip to main content
12,997,060 members (75,691 online)
Rate this:
Please Sign up or sign in to vote.
See more: , +
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">
                    <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}"/>

The problems appears to be in <datatemplate> tag and all the lines after that...
Posted 1-Dec-12 1:29am
Christian Amado 7-Dec-12 6:33am
Are you using any third-party control on your Silverlight Project?

1 solution

Rate this: bad
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.
IndifferentDisdain 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 7 Jan 2013
Copyright © CodeProject, 1999-2017
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