Bonjour;

Voila j'ai une petite question j'ai créer deux table sur la bdd local du téléphone l'une est Sonde et l'autre échantillon les deux on un id et la sonde contient un échantillon donc l'idechant est lié a la table Sonde.

voici ma table sonde
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
 
 [Table]
    public class SondeBdd : ViewModelBase
    {
        private int _IdSonde;
 
        [Column(IsPrimaryKey = true, IsDbGenerated = true, DbType = "INT NOT NULL Identity", CanBeNull = false, AutoSync = AutoSync.OnInsert)]
        public int IdSonde
        {
            get { return _IdSonde; }
            set
            {
                if (_IdSonde != value)
                {
                    NotifyPropertyChanging("IdSonde");
                    _IdSonde = value;
                    NotifyPropertyChanged("IdSonde");
                }
            }
        }
 
        [Column]
        internal int _IdEchantH;
        private EntityRef<EchantillonHBdd> _EchantH;
        [Association(Storage = "_EchantH", ThisKey = "_IdEchantH", OtherKey = "IdEchantH", IsForeignKey = true)]
        public EchantillonHBdd EchantH
        {
            get { return _EchantH.Entity; }
            set
            {
                NotifyPropertyChanging("EchantH");
                _EchantH.Entity = value;
                if (value != null)
                { _IdEchantH = value.IdEchantH; }
                NotifyPropertyChanged("EchantH");
            }
        }
Dans mon fichier XAML je voudrais binder la valeur de mon échantillon
Voici comment je mis suis pris:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<StackPanel Orientation="Vertical" Margin="0,88,0,0">
                    <StackPanel Height="402">
                        <!--<usc:UseControlSonde x:Name="ListEchant1" Height="400"/>-->
                        <phone:LongListSelector ItemsSource="{Binding SondeBddList}" Height="16777130">
                            <phone:LongListSelector.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel>
                                        <StackPanel Orientation="Horizontal">
                                            <StackPanel>
                                                <TextBlock Text="{Binding IdSonde}" TextWrapping="Wrap" FontSize="{StaticResource PhoneFontSizeLarge}" VerticalAlignment="Bottom"/>
                                            </StackPanel>
                                            <StackPanel>
                                                <TextBlock Text="{Binding EchantH}" TextWrapping="Wrap"  FontSize="{StaticResource PhoneFontSizeLarge}" VerticalAlignment="Bottom"/>
                                            </StackPanel>
je passe les lignes inutiles.

Voila si qu'elle qu'un peu m'aider ou me mettre sur la bonne voie Merci beaucoup.