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

UI Virtualization of DataFormComboBoxField

1 Answer 62 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
HCT-CERT
Top achievements
Rank 1
HCT-CERT asked on 21 Oct 2012, 10:50 AM
Hi,

I am trying to UI Virtualize a DataFormComboBoxField through styling, but could not find a way to do that.I copied the DataFormComboBoxField style in Blend but was not able to find the combo box on which to set the ItemsPanel to VirtualizingStackPanel.I am now doing through code and it works fine, but would like to move that to global style.

IEnumerable<DataFormComboBoxField> comboFields = MyRadForm.ChildrenOfType<DataFormComboBoxField>();
            foreach (DataFormComboBoxField comboField in comboFields)
            {
                
                  
                   ((RadComboBox)comboField.Content).ItemsPanel = Resources["VirtualizingItemsPanelTemplate
"
] as ItemsPanelTemplate;
                 
            }

<ItemsPanelTemplate x:Key="VirtualizingItemsPanelTemplate">
            <VirtualizingStackPanel />
        </ItemsPanelTemplate>

Thanks

Madani

1 Answer, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 22 Oct 2012, 07:04 AM
Hello Madani,

You do not need to find DataFormComboBoxField. You can create an implicit style targeting RadComboBox and it will be applied to its editing element (RadComboBox).

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DataForm
Asked by
HCT-CERT
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or