Click here to Skip to main content
15,905,420 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi

I want to pull data from the wcf and to display data, i uses the toolkit but not appearance. how to binding item with toolkit;


this is my xaml code :

XML
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" FlowDirection="LeftToRight" Grid.ColumnSpan="1" OpacityMask="{x:Null}" Visibility="Visible" Background="Black">
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Width="auto" FontSize="22" Text="Ημερ/νία:" Height="34" FontWeight="Black" />
                    <toolkit:DatePicker x:Name="datePicker" Value="2/3/2010" Width="263" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Foreground="#FF008300"></toolkit:DatePicker>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Width="117" FontSize="22" Text="Μαθημα:" Height="34" FontWeight="Black"/>
                    <toolkit:ListPicker x:Name="list"  Width="223">
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <Rectangle Height="50" Width="50" VerticalAlignment="Center" Fill="{Binding CoTitle}" Margin="5,30,20,20"></Rectangle>
                                <TextBlock Text="{Binding CoTitle}" VerticalAlignment="Center" FontSize="40"></TextBlock>
                            </StackPanel>
                        </DataTemplate>
                    </toolkit:ListPicker>
                </StackPanel>
            </StackPanel>
        </Grid>


c#:

C#
private void client_GetCoursesCompleted(object sender, ServiceReference1.GetCoursesCompletedEventArgs e) {
           try
           {
               this.list.Items.Clear();
               foreach (ServiceReference1.SRV_Course obj in e.Result)
               {


                   this.list.Items.Add(obj);
               }
               //this.list.ItemsSource = e.Result;

           }
           catch (Exception ex)
           {
               MessageBox.Show(ex.Message);
           }
       }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900