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

VirtualQueryableCollectionView and MVVM

1 Answer 107 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 15 Dec 2011, 11:19 AM
We develop using the mvvm-pattern. While the VirtualQueryableCollectionView can be easily created in the code-behind, I would prefer to create it as a StaticResource in the View, as it is View-specific and doesn't belong in the ViewModel.

How would I create it as a resource? I would have liked to write something like:

 

<UserControl.Resources>
    <telerik:VirtualQueryableCollectionView x:Key="VirtualizedTransactions" 
        LoadSize
="10" 
        
ItemsSource="{Binding AllTransactions}" 
    />
</UserControl.Resources>

 


Any thoughts are appreciated.

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 16 Dec 2011, 10:30 AM
Hello,

 Why not create a model with virtual collection as property and register the model as resource?

Regards,
Vlad
the Telerik team

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

Tags
GridView
Asked by
Mattias
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or