UI Virtualization of DataFormComboBoxField

2 posts, 1 answers
  1. HCT-CERT
    HCT-CERT avatar
    22 posts
    Member since:
    Aug 2012

    Posted 21 Oct 2012 Link to this post

    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
  2. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 22 Oct 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top