Home made data pagers and data paging
So, one of the big things I still wanted was good data paging.
Even though I'm still faking async calls so that screens show up immediately and aren't frozen as a result of loading data, I still don't want the user staring at a screen that is loading for a minute while I retrieve every single record from the database. So data paging and a UI data pager are a must.
The bad news was that while Silverlight does have a standard data pager, WPF does not. The good news is that I was able to create a nice little reusable one on my first attempt. Granted, I have been working with XAML and Data Binding for a while now and a year ago this project alone would have A) been done incorrectly and B) taken several hours to get there. But nonetheless, I am happy with the outcome.
The key was a solution abstract enough that it could be reused which meant some custom dependency properties and knowing how to offload most of the lifting to main control. Right now I'm using it with a List Box to display customers. Honestly... I think this list combined with a Data Pager would be one of the best introduction to WPF projects. Maybe I need to start a web page for this sort of thing.
Even though I'm still faking async calls so that screens show up immediately and aren't frozen as a result of loading data, I still don't want the user staring at a screen that is loading for a minute while I retrieve every single record from the database. So data paging and a UI data pager are a must.
The bad news was that while Silverlight does have a standard data pager, WPF does not. The good news is that I was able to create a nice little reusable one on my first attempt. Granted, I have been working with XAML and Data Binding for a while now and a year ago this project alone would have A) been done incorrectly and B) taken several hours to get there. But nonetheless, I am happy with the outcome.
The key was a solution abstract enough that it could be reused which meant some custom dependency properties and knowing how to offload most of the lifting to main control. Right now I'm using it with a List Box to display customers. Honestly... I think this list combined with a Data Pager would be one of the best introduction to WPF projects. Maybe I need to start a web page for this sort of thing.
Comments
Post a Comment