IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Windows Phone .NET Discussion :

XAML non valide pourtant l'application fonctionne [Windows Phone 8]


Sujet :

Windows Phone .NET

  1. #1
    Expert confirmé

    Homme Profil pro
    Développeur .NET
    Inscrit en
    Novembre 2010
    Messages
    2 065
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur .NET

    Informations forums :
    Inscription : Novembre 2010
    Messages : 2 065
    Points : 4 229
    Points
    4 229
    Par défaut XAML non valide pourtant l'application fonctionne
    Bonjour,

    j'ai un problème quand j'utilise un itemscontrol, il m'affiche systématiquement Xaml non valide pourtant quand je génère l'application le rendu est correct et j'ai aucune erreur.
    Voila mon Xaml:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    <UserControl x:Class="MonAppli.UC.SummonerUC"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        FontFamily="{StaticResource PhoneFontFamilyNormal}"
        FontSize="{StaticResource PhoneFontSizeNormal}"
        Foreground="{StaticResource PhoneForegroundBrush}"
      >
     
        <Grid x:Name="LayoutRoot" Background="Transparent">
            <ScrollViewer>
                <ItemsControl ItemsSource="{Binding }">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Border BorderThickness="1" BorderBrush="Black">
                                <Grid DoubleTap="Grid_DoubleTap">
                                    <Grid.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFf5efe2" Offset="0"/>
                                            <GradientStop Color="#FFe0cd97" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Grid.Background>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="100"/>
                                        <ColumnDefinition Width="*"/>
     
                                    </Grid.ColumnDefinitions>
                                    <Image Margin="2,2,2,2" Grid.Column="0" Height="96" Width="96" Source="{Binding ProfileIconId,Converter={StaticResource  IdToUrlImageConverter},ConverterParameter=ProfileIcon}" ></Image>
     
                                    <StackPanel Grid.Column="1">
                                        <TextBlock Margin="5,0,0,0"  Style="{StaticResource BlackText}"  Text="{Binding Name}"></TextBlock>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Margin="5,0,0,0"  Style="{StaticResource BlackText}"  Text="{Binding Source={StaticResource LocalizedStrings},Path=LocalizedResources.Level}"></TextBlock>
                                            <TextBlock Margin="5,0,0,0"  Style="{StaticResource BlackText}"  Text="{Binding SummonerLevel}"></TextBlock>
                                            <TextBlock Margin="5,0,0,0"  Style="{StaticResource BlackText}"  Text="{Binding RevisionDate,Converter={StaticResource timestamp},StringFormat='{}{0:dd/MM/yyyy}'}"></TextBlock>
                                        </StackPanel>
                                    </StackPanel>
     
                                </Grid>
                            </Border>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </ScrollViewer>
        </Grid>
    </UserControl>
    L'erreur survient au niveau du datatemplate savez-vous ce qui cloche ?

  2. #2
    Membre expérimenté Avatar de DotNET74
    Homme Profil pro
    Watch R&D Engineer & Apprenti .NET
    Inscrit en
    Août 2003
    Messages
    1 986
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France

    Informations professionnelles :
    Activité : Watch R&D Engineer & Apprenti .NET

    Informations forums :
    Inscription : Août 2003
    Messages : 1 986
    Points : 1 453
    Points
    1 453
    Par défaut
    Je crois que c'est un petit bug de Visual Studio ...

    Olivier Dahan en parle sur son blog Dot.Blog de mémoire
    La Théorie c'est quand on comprends tout mais que rien ne fonctionne.
    La Pratique c'est quand tout fonctionne mais qu'on ne sait pas pourquoi !

    Si vous aimez ma réponse, cliquez sur la main verte Merci

  3. #3
    Membre expert
    Avatar de GuruuMeditation
    Homme Profil pro
    .Net Architect
    Inscrit en
    Octobre 2010
    Messages
    1 705
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 49
    Localisation : Belgique

    Informations professionnelles :
    Activité : .Net Architect
    Secteur : Conseil

    Informations forums :
    Inscription : Octobre 2010
    Messages : 1 705
    Points : 3 568
    Points
    3 568
    Par défaut
    Oui le designer est parfois capricieux!
    Microsoft MVP : Windows Platform

    MCPD - Windows Phone Developer
    MCPD - Windows Developer 4

    http://www.guruumeditation.net

    “If debugging is the process of removing bugs, then programming must be the process of putting them in.”
    (Edsger W. Dijkstra)

  4. #4
    Rédacteur/Modérateur


    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2004
    Messages
    19 875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2004
    Messages : 19 875
    Points : 39 749
    Points
    39 749
    Par défaut
    C'est un problème récurrent dans toutes les versions de VS depuis l'apparition de XAML... Il n'y a encore jamais eu un designer XAML qui marche correctement

  5. #5
    Expert confirmé

    Homme Profil pro
    Développeur .NET
    Inscrit en
    Novembre 2010
    Messages
    2 065
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur .NET

    Informations forums :
    Inscription : Novembre 2010
    Messages : 2 065
    Points : 4 229
    Points
    4 229
    Par défaut
    Merci pour cette info, je pensais juste que j'avais fais une erreur de syntaxe.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. XAML non valide
    Par Samyy17 dans le forum Visual Studio
    Réponses: 0
    Dernier message: 11/05/2014, 10h56
  2. Windows Phone xaml non valide ?
    Par Jyngle dans le forum Développement Windows
    Réponses: 8
    Dernier message: 18/04/2014, 17h42
  3. xaml non valide
    Par technosmile dans le forum Silverlight
    Réponses: 7
    Dernier message: 08/03/2011, 12h06
  4. Réponses: 8
    Dernier message: 22/05/2006, 09h25

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo