ScrollBars in List Box

3 posts, 0 answers
  1. Hardik
    Hardik avatar
    11 posts
    Member since:
    Jun 2012

    Posted 22 Aug 2012 Link to this post

    Hii,

    I am not able to view scrollbars in my ListBox. I checked a few posts on the site under General Discussion and tried removing the StackPanel, eventhough its not working. However, I am also using a rad wrap panel.
    I might be doing something wrong. Kindly check my code.

    <UserControl.Resources>
            <ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
                <telerik:RadWrapPanel Width="610" Height="300" />
            </ItemsPanelTemplate>
            <DataTemplate x:Key="DataTemplate1">
                <Border BorderBrush="#cecfce" BorderThickness="1">
                    <StackPanel Orientation="Horizontal" Width="200" Height="24" >
                        <TextBlock Text="{Binding Path=Name}" Margin="5,0,0,0" VerticalAlignment="Center" ></TextBlock>
                    </StackPanel>                          
                </Border>
            </DataTemplate>
        </UserControl.Resources>
     
        <Grid x:Name="LayoutRoot" Background="White" Margin="50,50,50,0">
            <telerik:ListBox ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" x:Name="list" MaxHeight="300" Grid.Row="0" Grid.Column="0"  VerticalAlignment="Top" ItemsPanel="{StaticResource ItemsPanelTemplate1}" ItemTemplate="{StaticResource DataTemplate1}">
            </telerik:ListBox
        </Grid>


    Thanks and Regards,
    Hardik
  2. George
    Admin
    George avatar
    1332 posts

    Posted 27 Aug 2012 Link to this post

    Hello Hardik,

    I would suggest using the RadListBox control instead of the ListBox. Please, give it a try and let me know if this helps.

    Kind regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Hardik
    Hardik avatar
    11 posts
    Member since:
    Jun 2012

    Posted 27 Aug 2012 Link to this post

    Hi George,
    Thank you so much for the reply.
    I checked my RadControls and I couldn't find RadListBox control. The telerik:ListBox control is available but the RadListBox does not exist in my set of RadControls. I have already included the Telerik.Windows.Controls reference.
    It seems I'm having an older version of RadControls.
    Is there any solution for this, for the telerik:Listbox control??


    --
    Thanks and Regards,
    Hardik
Back to Top