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

VirtualizingWrapPanel in listbox

2 Answers 115 Views
VirtualizingWrapPanel
This is a migrated thread and some comments may be shown as answers.
Shilpi
Top achievements
Rank 1
Shilpi asked on 24 May 2012, 12:00 AM
Hi,

My code is pretty simple -

<

 

 

ListBox x:Name="booksListBox" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" >

 

 

<ListBox.ItemsPanel>

 

 

<ItemsPanelTemplate>

 

 

<telerik:VirtualizingWrapPanel ItemWidth="80"/>

 

 

</ItemsPanelTemplate>

 

 

</ListBox.ItemsPanel>

 

 

<ListBox.ItemTemplate>

 

 

<DataTemplate>

 

 

<StackPanel Orientation="Vertical">

 

 

<TextBlock Text="{Binding Author}" />

 

 

<TextBlock Text="{Binding Name}" />

 

 

</StackPanel>

 

 

</DataTemplate>

 

 

</ListBox.ItemTemplate>

 

 

</ListBox>



I get the following error - +  ExceptionObject {System.ArgumentException: Value does not fall within the expected range.} System.Exception {System.ArgumentException}

I am not sure which VirtualizingWrapPanel Property needs to be setin order for this to work.

Any help would be appreciated.
Thanks, Shilpi

2 Answers, 1 is accepted

Sort by
0
Shilpi
Top achievements
Rank 1
answered on 24 May 2012, 03:54 AM
I was able to fix the error by setting MaxHeight and MaxWidth; but I am not sure what I should set that to.
0
Pavel Pavlov
Telerik team
answered on 24 May 2012, 02:25 PM
Hi Shilpi,

Can you attach a small project here with your code that exposes the issue. I was trying it here but with no success to expose the exception.

Kind regards,
Pavel Pavlov
the Telerik team

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

Tags
VirtualizingWrapPanel
Asked by
Shilpi
Top achievements
Rank 1
Answers by
Shilpi
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Share this question
or