I have made a calendar control based on the pivot control. Every pivot item represents one month. In this way I don’t have the annoying arrows, which usually everybody use to switch between the months and I really love the native way you can browse the calendar. The calendar itself is pretty fancy and in each cell for every day, I have several images. The problem is that the performance is awful.
Initially I have bound the images visibility property with a bool property(using a converter), but I have read that the visibility binding isn’t good, cause it redraws the UI elements again. Then I have decided to bind the Opacity property of the images with the same bool property from my ViewModel. The performance got better, but it is still slow. So, basically, I have a calendar with cells and 3-4 images in each cell. I am setting each image’s visibility/opacity using binding, but in both ways the performance is very bad.
So, basically in each calendar cell I have 5 x this image:
<Image Source="../Images/blabla.png" IsHitTestVisible="False"
Opacity="{Binding IsBlaBla, Converter={StaticResource BoolToOpacityConverter}}" />
Have you guys have an idea how I can improve the performance? I am out of ideas. 🙁
Assuming your performance issue is one of the UI being slow to interact with, you might consider using David Anson’s LowProfileImageLoader to alleviate the bottleneck affecting this.
Keep a low profile [LowProfileImageLoader helps the Windows Phone 7 UI thread stay responsive by loading images in the background] – Delay’s Blog
There’s no substitute for customer feedback! [Improving Windows Phone 7 application performance now a bit easier with LowProfileImageLoader and DeferredLoadListBox updates] – Delay’s Blog
Also, there are a lot of things you can look at to tune performance. Details in the latter parts of my answer in this Question.
Design advices for quick navigation between view