访问ListBox中的ListPicker控件

时间:2011-06-17 15:59:58

标签: windows-phone-7

在WP7应用程序中,如何访问ListBox itemtemplate中的ListPicker控件。 这是我的代码。

<ListBox ItemsSource="{Binding p_FilterItems}" Margin="0,0,0,8" x:Name="FilterListBox" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" BorderThickness="0" >
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" >
                                <TextBlock Text="{Binding p_Filter}" Foreground="#FFC8AB14" FontSize="24" Height="35" Width="152"  />
                                <toolkit:ListPicker ItemsSource="{Binding filterItems}" Height="43" Name="listPicker1" Width="249" FullModeHeader="{Binding p_Filter}" ItemCountThreshold="1" />
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>

                </ListBox>

0 个答案:

没有答案