Ordinarily, if I hide/show an element containing a RadGridView, when I show it the first time, it takes around a half second to initialize, but when I show it a second time it appears almost instantaneously.
Unless I put it in a Popup, as I discovered when trying to implement a ComboBox-like UserControl. Then it initializes every time the Popup is displayed. The RadGridView in this example is bound to a collection containing three strings, and it takes about a half second to display every time I click on the ToggleButton:
<DockPanel>
<ToggleButton DockPanel.Dock="Top"
x:Name="Toggle">Show/Hide</ToggleButton>
<Popup IsOpen="{Binding ElementName=Toggle, Path=IsChecked}"
Placement="Bottom">
<Controls:RadGridView ItemsSource="{Binding Strings}"
ShowGroupPanel="False"
AutoGenerateColumns="False">
<Controls:RadGridView.Columns>
<Controls:GridViewDataColumn IsFilterable="False"
IsGroupable="False"
IsReadOnly="True"
SortingState="Ascending"
Header="String"
DataMemberBinding="{Binding}" />
</Controls:RadGridView.Columns>
</Controls:RadGridView>
</Popup>
</DockPanel>
Is there something I can do to get around this? I'd really like to avoid having to go back to using a ListView in my control.
Thanks,
Robert