Note that there are some explanatory texts on larger screens.

plurals
  1. POThis Xaml is not valid... I don't understand why
    primarykey
    data
    text
    <p>I've a strange problem with xaml. Visual studio for wp tell me that the xaml is not valid but when I execute the app it works fine. </p> <pre><code> &lt;phone:PhoneApplicationPage x:Class="Friends_And_Money.ContList" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Friends_And_Money" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" SupportedOrientations="Portrait" Orientation="Portrait" mc:Ignorable="d" shell:SystemTray.IsVisible="True"&gt; &lt;!--LayoutRoot è la griglia radice in cui viene inserito tutto il contenuto della pagina--&gt; &lt;phone:PhoneApplicationPage.Resources&gt; &lt;local:ContactPictureConverter x:Key="ImageConverter" /&gt; &lt;DataTemplate x:Key="AddrBookGroupHeaderTemplate"&gt; &lt;Border Background="Transparent" Padding="5"&gt; &lt;Border Background="{StaticResource PhoneAccentBrush}" BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="2" Width="62" Height="62" Margin="0,0,18,0" HorizontalAlignment="Left"&gt; &lt;TextBlock Text="{Binding Key}" Foreground="{StaticResource PhoneForegroundBrush}" FontSize="48" Padding="6" FontFamily="{StaticResource PhoneFontFamilySemiLight}" HorizontalAlignment="Left" VerticalAlignment="Center"/&gt; &lt;/Border&gt; &lt;/Border&gt; &lt;/DataTemplate&gt; &lt;phone:JumpListItemBackgroundConverter x:Key="BackgroundConverter"/&gt; &lt;phone:JumpListItemForegroundConverter x:Key="ForegroundConverter"/&gt; &lt;Style x:Key="AddrBookJumpListStyle" TargetType="phone:LongListSelector"&gt; &lt;Setter Property="GridCellSize" Value="113,113"/&gt; &lt;Setter Property="LayoutMode" Value="Grid" /&gt; &lt;Setter Property="ItemTemplate"&gt; &lt;Setter.Value&gt; &lt;DataTemplate&gt; &lt;Border Background="{Binding Converter={StaticResource BackgroundConverter}}" Width="113" Height="113" Margin="6" &gt; &lt;TextBlock Text="{Binding Key}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" FontSize="48" Padding="6" Foreground="{Binding Converter={StaticResource ForegroundConverter}}" VerticalAlignment="Center"/&gt; &lt;/Border&gt; &lt;/DataTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;DataTemplate x:Key="AddrBookItemTemplate"&gt; &lt;StackPanel VerticalAlignment="Top" Margin="0,5,0,5"&gt; &lt;Grid&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="5" &gt;&lt;/ColumnDefinition&gt; &lt;ColumnDefinition Width="auto" &gt;&lt;/ColumnDefinition&gt; &lt;ColumnDefinition Width="5" &gt;&lt;/ColumnDefinition&gt; &lt;ColumnDefinition Width="auto" &gt;&lt;/ColumnDefinition&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Image Source="{Binding Photo, Converter={StaticResource ImageConverter}}" Grid.Column="1" Width="62" Height="62" Stretch="Fill" /&gt; &lt;TextBlock Grid.Column="3" FontWeight="Light" FontSize="40" Text="{Binding FirstName}" /&gt; &lt;/Grid&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/phone:PhoneApplicationPage.Resources&gt; &lt;Grid x:Name="LayoutRoot" Background="Transparent"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="*"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;!--TitlePanel contiene il nome dell'applicazione e il titolo della pagina--&gt; &lt;StackPanel Grid.Row="0" Margin="12,17,0,28"&gt; &lt;TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/&gt; &lt;TextBlock Text="{Binding Path=LocalizedResources.ContactTitle, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/&gt; &lt;/StackPanel&gt; &lt;!--ContentPanel - inserire ulteriore contenuto qui--&gt; &lt;Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"&gt; &lt;phone:LongListSelector x:Name="LongList" Background="Transparent" GroupHeaderTemplate="{StaticResource AddrBookGroupHeaderTemplate}" ItemTemplate="{StaticResource AddrBookItemTemplate}" JumpListStyle="{StaticResource AddrBookJumpListStyle}" LayoutMode="List" IsGroupingEnabled="true" HideEmptyGroups ="true" /&gt; &lt;/Grid&gt; &lt;/Grid&gt; &lt;/phone:PhoneApplicationPage&gt; </code></pre> <p>I've followed the tutorial (with the difference of a longlistselector) from here : [http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286418(v=vs.105).aspx][1]</p> <p>How I say all works fine, longlistselector show me images and contact's name. </p> <p>Struct to show:</p> <pre><code>namespace Friends_And_Money { class ContactStruct { public string FirstName { get; set; } public WriteableBitmap Photo { get; set; } public ContactStruct(string name, WriteableBitmap photo) { this.FirstName = name; this.Photo = photo; } } } </code></pre> <p>Thanks to every one that help.</p> <p>New details: The error is signed in datatemplate AddrBookItemTemplate and I've noted that if I leave image source attribute the error disappear. So seems be something with the binding.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload