This is a migrated thread and some comments may be shown as answers.

Popup displays class name

1 Answer 44 Views
ListPicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Karsten
Top achievements
Rank 1
Karsten asked on 28 Jun 2012, 08:37 AM
After the recent update of the RadControls for Windows Phone 7 I am seeing some strange behavior with the ListPicker control.
Instead of displaying the data values in the popup it is displaying the class name.

To reproduce.
Open the ExamplesCS_WP solution and goto ListPicker, Modes.xaml and change the InlineModeThreshold to 4 for both ListPickers.

InlineModeThreshold="4" 

The top listpicker works correctly and displays the colors in the popup, but the lower displays the classname.

1 Answer, 1 is accepted

Sort by
0
Lancelot
Top achievements
Rank 1
answered on 28 Jun 2012, 07:13 PM
Hi Karsten,

I have reproduced the strange behavior. I was able to fix the issue by adding a PopupItemTemplate along with the ItemTemplate. You can reproduce the fix using the same example and the popup template below. My explanation of why this happens is below.

<telerikInput:RadListPicker.PopupItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="0, 27, 0, 24">
                                <Rectangle Fill="{Binding ColorName}" Width="43" Height="43"/>
                                <TextBlock Text="{Binding ColorName}" Margin="16 -8 0 0"/>
                            </StackPanel>
                        </DataTemplate>
                    </telerikInput:RadListPicker.PopupItemTemplate>


  The reason this happened is because you set the popup threshold lower than the amount of items. The control will then assume you want it to popup because there are more items than slots in the drop down. The reason you saw the class names is because you now have a control that is going to popup without an ItemsTemplate to hold the list.

Once you add a PopupItemTemplate, you will be good to go.

Good Luck,
Lancelot
Tags
ListPicker
Asked by
Karsten
Top achievements
Rank 1
Answers by
Lancelot
Top achievements
Rank 1
Share this question
or