PivotItem Header和ListPicker里面

时间:2012-07-31 14:26:51

标签: wpf windows-phone-7 listpicker pivotitem

我在ListPicker标题内遇到PivotItem问题。如何解决?

我的代码:

<controls:PivotItem Name="PivotItemTop">
<controls:PivotItem.Header>    
    <StackPanel Background="#6DA3BD" 
                Margin="-24,-20,-1,0"
                Width="420"
                Name="StackPanelTop">  
        <TextBlock Text="TEST"
                    FontSize="48"
                    Foreground="White"
                    Padding="23,0"/>
        <toolkit:ListPicker Margin="24,0,24,10" 
                            Template="{StaticResource ListPickerTemplate}"
                            Name="ListPickerTop"
                            SelectionChanged="ListPickerTop_SelectionChanged">
        </toolkit:ListPicker>
    </StackPanel>
</controls:PivotItem.Header>

<ListBox Name="ListBoxTop"
                ItemsSource="{Binding TopItems}"
                ItemTemplate="{StaticResource ItemListBox}"/>

</controls:PivotItem>

并填写:

ListPickerTop.ItemsSource = new List<string> { "1", "2", "3", "4", "5" };

请看图片上的结果:

Example page.

Image of problem http://www35.zippyshare.com/i/52464056/9126813/qqqq.png

0 个答案:

没有答案