<ListBox Height="650" HorizontalAlignment="Left" Margin="11,17,0,0" Name="listBox1" VerticalAlignment="Top" Width="434" > <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding ProdId}"/> <TextBlock Text="{Binding ProdPrice}"/> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox>
public MainPage() { InitializeComponent(); Service1Client svc = new Service1Client(); svc.GetAllModelsCompleted += new EventHandler<GetAllModelsCompletedEventArgs>(svc_GetAllModelsCompleted); svc.GetAllModelsAsync(); } void svc_GetAllModelsCompleted(object sender, GetAllModelsCompletedEventArgs e) { listBox1.ItemsSource = e.Result; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)