This post was from long time ago when I did Windows Phone 7. Many of the things I learned still apply for today
Welcome back, today I will start writing all stuff, all the secret I 've revealed when developing for Windows Phone 7.
- When setting - UIElement's- Visibilityto- Collapsed, the OS set its- Heightto 0. So if you need to have a Height of 0, simply set- Height="0", which is faster in term of show time.
- When clearing data source, - ListBoxwhich uses- VirtualizingStackPaneldoes not rememeber its last view, whereas- StackPaneldoes
- ListBoxwhich is inside- ScrollViewerwill lose its UI virtualization, even if you use- VirtualizingStackPanel
- Using - GestureListenerincorrectly will cause other- UIElementto not work, i.e- Slider, ...
- AdControl,- ContextMenumay be a source of memory leak.
- Panorama control still enable swiping when there is only 1 - PanoramaItem, whereas- Pivotdoes not.
- Pivot control will load the current - PivotItem, as well as its direct left and right- PivotItem.
- Sometimes SIP keyboard does not show up, check your phone for physical keyboard problem. 
- There is no way to rate a Song for 3rd app 
- When emulator rendering has overlap issue, the workaround is to set - LayoutRoot's- Backgroundto a solid color
- Supposed you're using - ObservableCollectionbindSource as binding source for- ListBox. When adding items to bindSource quickly,- ListBoxseems to suppress creating- ListBoxItemuntil all items are added. It is advised to add items in batch
- WebBrowsercontrol does not have scroll bar
- Using - StoryBoardwhen ever possible, because all of its animation is done in Compositor Thread, which leverages GPU
- Use - ProgressIndicatorfor best performance and UX familiarity
- Collapse unimportant - UIElementto decrease load time, and show them when Page is completely loaded.
- Always unsubscribe to event source that can continue to run when the Page is navigated from, because that may cause memory leak. Examples are timer, - BackgroundAudioPlayer.PlayeStateChanged, ...
- Using file is much faster than Local Database 
- Remember the limit 260 characters of query string 
Original post https://github.com/onmyway133/blog/issues/156
 

 
    
Top comments (2)
Windows phone 7.8 is EOL since 2014, why post this? Windows Phone 8.1 is EOL since 2017 too and even Windows 10 Mobile is going EOL this year.
Is like if someone asked for ActionScript advice ...