BUG: Visibility property in RadListPicker control

8 posts, 0 answers
  1. Kunal Chowdhury
    Kunal Chowdhury avatar
    23 posts
    Member since:
    May 2010

    Posted 07 May 2012 Link to this post

    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
    
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 08 May 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. Kunal Chowdhury
    Kunal Chowdhury avatar
    23 posts
    Member since:
    May 2010

    Posted 13 May 2012 Link to this post

    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.
  5. Todor
    Admin
    Todor avatar
    778 posts

    Posted 14 May 2012 Link to this post

    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 >>

  6. Martin
    Martin avatar
    26 posts
    Member since:
    Jul 2012

    Posted 05 Oct 2012 Link to this post

    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.

  7. Todor
    Admin
    Todor avatar
    778 posts

    Posted 10 Oct 2012 Link to this post

    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.

  8. Martin
    Martin avatar
    26 posts
    Member since:
    Jul 2012

    Posted 10 Oct 2012 Link to this post

    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.
  9. Todor
    Admin
    Todor avatar
    778 posts

    Posted 12 Oct 2012 Link to this post

    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.

Back to Top
DevCraft banner