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

Programatic Virtualization

2 Answers 70 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
danparker276
Top achievements
Rank 2
danparker276 asked on 14 Apr 2011, 10:57 PM
I'm having some trouble with the syntax.  I'm trying to replicate
<telerik:RadComboBox.ItemsPanel>
    <ItemsPanelTemplate>
        <VirtualizingStackPanel />
    </ItemsPanelTemplate>
</telerik:RadComboBox.ItemsPanel>

I tried

.rcMatter.ItemsPanel = (

 

ItemsPanelTemplate)Resources["VirtualizingStackPanel"];

 


That will work to take it away, but not make it virtualizating.  Maybe it's a difffernt name I need?

2 Answers, 1 is accepted

Sort by
0
Accepted
George
Telerik team
answered on 20 Apr 2011, 10:10 AM
Hello ,

I would suggest you defining the ItemsPanelTemplate as Resources:

<UserControl.Resources>
        <ItemsPanelTemplate x:Key="virtualizingStackPanel">
            <VirtualizingStackPanel />
        </ItemsPanelTemplate>  
</UserControl.Resources>

and set it  to the RadComboBox.ItemsPanel in the code-behind like this:

this.combo.ItemsPanel = this.Resources["virtualizingStackPanel"] as ItemsPanelTemplate;

I hope this helps.


Kind regards,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
danparker276
Top achievements
Rank 2
answered on 20 Apr 2011, 07:41 PM
Ahh, thanks, I didn't see I needed to use it as a resource.
Tags
ComboBox
Asked by
danparker276
Top achievements
Rank 2
Answers by
George
Telerik team
danparker276
Top achievements
Rank 2
Share this question
or