Basicly this is a part of XAML that makes the parser throw XamlParseException:
<StackPanel Orientation="Horizontal" Margin="0,0,0,17">
<Rectangle Name="settingsRectYourCity" Height="100" Width="100"
Fill="{StaticResource PhoneAccentBrush}" Margin="12,0,9,0"
MouseLeftButtonUp="settingsRectYourCity_MouseLeftButtonUp" />
<StackPanel Width="311">
<TextBlock Text="Your city" TextWrapping="Wrap"
Style="{StaticResource PhoneTextExtraLargeStyle}"/>
<TextBlock Text="Two" TextWrapping="Wrap" Margin="12,-6,12,0"
Style="{StaticResource PhoneTextSubtleStyle}"/>
<ListBox Name="settingsCityListbox" Visibility="Collapsed"
HorizontalAlignment="Center" FontSize="36" Margin="0,10,0,20"
SelectionMode="Single">
<ListBoxItem>One</ListBoxItem>
<ListBoxItem>Two</ListBoxItem>
<ListBoxItem>Three</ListBoxItem>
</ListBox>
</StackPanel>
</StackPanel>
To be even more specific, when I delete the ListBox content, all the ListBoxItems, there are no exceptions at all. What am I doing wrong?
Edit: I managed with a kind of workaround (or the only good construction of the above). I closed the plain text of ListBoxItems in a TextBlock each. I still don't know and am curios the reason, but parser won't allow plain text there. Maybe its the issue of parsing xaml for WP7.