2012-04-13 21 views
2

嗨即時通訊創建一個WP7app,你可以選擇使用列表選擇類別。WP7中選定的ListPicker值設置文本

<toolkit:ListPicker Header="Choose Categories" 
            SelectionMode="Multiple" 
            FullModeHeader="CATEFORIES" 
            x:Name="ListPickerCategories" 
            CacheMode="BitmapCache"         
            HorizontalAlignment="Left" 
            Margin="24,482,0,0" 
            VerticalAlignment="Top" 
            Width="401"         
            Grid.ColumnSpan="2" 
            ItemsSource="{Binding Categories}">     
       </toolkit:ListPicker> 

enter image description here

當選擇我希望能夠指定什麼值將在箱子上面顯示的類別。現在默認是始終顯示第一個選定的值。

你如何指定這個?

+1

使用一些類似這樣的標題= 「{綁定的ElementName = ListPickerCategories路徑selecteditem.value}」 – innovia 2012-04-13 08:13:48

+0

重複這個問題:http://stackoverflow.com/questions/8670898/listpicker -multiple-selection-and-displaymemberpath – Ku6opr 2012-04-13 09:05:01

回答

2

更改ListPickerMode財產Expanded然後將ItemCountThreshold設置爲您需要顯示的項目的數量。

的更多信息,你可以找到here

+0

ItemCountThreshold在WP7.1中是隻讀的我知道使用的版本沒有問題,但是你的回答無法解決問題。謝謝 – 2012-04-15 14:18:33

+0

更正:indicatoin * – 2012-04-15 14:31:44