[Silverlight entry series] envy and hate for the domaindatasource Control

Source: Internet
Author: User

Silverlighttoolkit has a domaindatasource control. This control is really cool with RIA domain service. What paging, sorting, filtering... are all cloudification, Drag Control, noneCodeIs extremely simple. However, the domaindatasource control is not compatible with the mvvm mode. If you use it, it is not the mvvm mode. Microsoft always makes some amazing Hello WorldProgramTo fool you like to drag control entry cainiao. I am used to it. Okay, today we are dragging controls .....

Add the domaindatasource control of silverlighttoolkit in the toolbox, drag it to the interface, drag a DataGrid, A datapager, and configure some properties. After the configuration, the XAML code is as follows:

 
  
             
               
    
     

       
        
         
          
            
        
       
      

     
    
    
     

       
        
         
        
      

      
        
  
 

Note that there is a query function in the background domainservice1.cs that is getmyentities (). Note that there is no code in XAML. CS.

Then press F5 to run the task. The page is displayed (and the page is displayed on the server), and the task is sorted (press the DataGrid column header to automatically display the page on the server, and you can also configure datasource. sortdescriptors) also has and filters (configure datasource. filterdescriptors) is also easy .... it's amazing.

Hate: if you are using the mvvm mode, move on. This control cannot be used at all!(The implementation method of viewmodel is described in my article.Article)

Additional reading
    • Viewmodel
    • Introducing an mvvm-friendly domaindatasource: The domaincollectionview


Is it a good idea to put domain datasource in viewmodel? No!

Read this article and this article.

Domaincollectionview Implement more powerful server-side paging/sorting/filtering/search-mvvm-friendly

View my article
Chapter
Entitylist <t>/domaincollectionview <t>
/Domaincollectionviewloader <t>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.