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

BUG: Visibility property in RadListPicker control

7 Answers 59 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.
Kunal Chowdhury
Top achievements
Rank 2
Kunal Chowdhury asked on 07 May 2012, 05:09 PM
Hi,

I just found a bug in WP7 RadListPicker control. When you set Visibility.Collapsed to the RadListPicker control, it doesn't reflect the UI i.e. it always remains as Visible. To test it, use this code:

<telerikInput:RadListPicker Visibility="Collapsed">
                <telerikInput:RadListPickerItem Content="Item 1"/>
                <telerikInput:RadListPickerItem Content="Item 2"/>
</telerikInput:RadListPicker>

I am using version: 2012.1.321.2040

7 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 08 May 2012, 08:36 AM
Hello Kunal,

Thank you for contacting us.

We tried to reproduce the issue that you are describing but we couldn't. After the Visibility property is set to Collapsed, the ListPicker is not Visible. This is why I would like to ask you to prepare a sample project that reproduces this case, so we could see exactly what is happening.
Please note that you will have to open a new support ticket in order to attach a project.

I'm looking forward to your reply.

Kind regards,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Kunal Chowdhury
Top achievements
Rank 2
answered on 13 May 2012, 05:46 PM
Sorry Todor, I am unable to reproduce it now. I tried it in a blank project where it was not reproduced but it was reproducible in my app project. Later while doing the in-depth investigation, I removed all the obj and bin folders of the solution, cleaned and rebuilt. It was working fine. Looks like something messed up in that solution. Sorry for the inconvenience caused.
0
Todor
Telerik team
answered on 14 May 2012, 08:54 AM
Hi Kunal,

Don't worry. There is no inconvenience caused.
I'm glad to see that now everything works as expected.

Greetings,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Martin
Top achievements
Rank 1
answered on 05 Oct 2012, 11:20 AM

I am having the same isuse right now - I got RadListPicker in StackPanel. I want to collapse this stackpanel based on databound model. If I set the height of the stackpanel to 0, the nested radlistpickers are still visible!

To reproduce it just add this to the default empty Windows Phone app:

<StackPanel x:Name="LocationReminderPanel" Height="0" Margin="12,0">
<telerikInput:RadListPicker x:Name="LocationReminderTypePicker" Header="header" Margin="0,0,0,12" Height="99"/>
<telerikInput:RadListPicker x:Name="LocationReminderPicker" Header="header" Margin="0,0,0,12" Height="99"/>
</StackPanel>

Edit - interesting thing - there is no problem if I add TimePicker or DatePicker to this StackPanel.

Edit2 - RadListPicker is also not respecting height - I set here manually 99px, but the height is still 83px. If I set MinHeight 00px, then after choosing other value, the value box looks strangely enlarged.

0
Todor
Telerik team
answered on 10 Oct 2012, 10:11 AM
Hello Martin,

Thank you for contacting us.

We have been able to reproduce the described issue but we will need more time to further investigate the cause for it. For now, I can offer you as a workaround to use the Visibility property and Collapse the StackPanel, instead of setting its Height. Please accept our apologies for the caused inconvenience.

Kind regards,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Martin
Top achievements
Rank 1
answered on 10 Oct 2012, 11:32 AM
That's what I use right now, together with Height="0", because in StackPanel only setting item to Collpased does not work, because it still occupies the original place.
0
Todor
Telerik team
answered on 12 Oct 2012, 07:19 AM
Hi Martin,

What I mean is to set the Visibility of the StackPanel to Collapsed and it should be hidden. For example, if you try this on an empty page:
<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
    </Grid.RowDefinitions>
    <StackPanel x:Name="LocationReminderPanel" Visibility="Collapsed" Margin="12,0">
        <telerikInput:RadListPicker x:Name="LocationReminderTypePicker" Header="header" Margin="0,0,0,12" Height="99"/>
        <telerikInput:RadListPicker x:Name="LocationReminderPicker" Header="header" Margin="0,0,0,12" Height="99"/>
    </StackPanel>
    <StackPanel Grid.Row="1">
        <TextBlock Text="line"/>
    </StackPanel>
</Grid>

The StackPanel shouldn't take any place on the screen. What is the container of the StackPanel that you want to collapse?

All the best,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ListPicker
Asked by
Kunal Chowdhury
Top achievements
Rank 2
Answers by
Todor
Telerik team
Kunal Chowdhury
Top achievements
Rank 2
Martin
Top achievements
Rank 1
Share this question
or