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

ScrollBars in List Box

2 Answers 36 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Hardik
Top achievements
Rank 1
Hardik asked on 22 Aug 2012, 05:49 AM
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 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 27 Aug 2012, 07:51 AM
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.

0
Hardik
Top achievements
Rank 1
answered on 27 Aug 2012, 09:32 AM
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
Tags
ListBox
Asked by
Hardik
Top achievements
Rank 1
Answers by
George
Telerik team
Hardik
Top achievements
Rank 1
Share this question
or