[WPF] Binding d'une combobox
Bonjour,
J'ai fait une appli c# 3.0 dans laquelle il y a une combobox. Dans le code de ma window j'ai une propriété "Data" qui renvoie DataRow[].
Je voudrai bindé la combobox sur cette propriété. Dans le code xaml j'ai donc écrit:
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
<Window
x:Class="WindowsApplication.Window1"
x:Name="itIsThis"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="WindowsApplication" Height="300" Width="300"
>
<Grid>
<ComboBox ItemsSource="{Binding Path=Data, ElementName=itIsThis}" Height="24" Margin="13,11,8,0" Name="comboBox1" VerticalAlignment="Top" />
</Grid>
</Window> |
Je lance l'application mais la combobox est vide! :cry:
Est-ce que quelqu'un saurait pourquoi le binding n'a pas marcher?
Merci d'avance