Issue #156
This post was from long time ago when I did Windows Phone 7
Welcome back, today I will start writing all stuff, all the secret I ’ve revealed when developing for Windows Phone 7.
-
When setting
UIElement
’sVisibility
toCollapsed
, the OS set itsHeight
to 0. So if you need to have a Height of 0, simply setHeight="0"
, which is faster in term of show time. -
When clearing data source,
ListBox
which usesVirtualizingStackPanel
does not rememeber its last view, whereasStackPanel
does -
ListBox
which is insideScrollViewer
will lose its UI virtualization, even if you useVirtualizingStackPanel
-
Using
GestureListener
incorrectly will cause otherUIElement
to not work, i.eSlider
, … -
AdControl
,ContextMenu
may be a source of memory leak. -
Panorama control still enable swiping when there is only 1
PanoramaItem
, whereasPivot
does not. -
Pivot control will load the current
PivotItem
, as well as its direct left and rightPivotItem
. -
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
’sBackground
to a solid color -
Supposed you’re using
ObservableCollection
bindSource as binding source forListBox
. When adding items to bindSource quickly,ListBox
seems to suppress creatingListBoxItem
until all items are added. It is advised to add items in batch -
WebBrowser
control does not have scroll bar -
Using
StoryBoard
when ever possible, because all of its animation is done in Compositor Thread, which leverages GPU -
Use
ProgressIndicator
for best performance and UX familiarity -
Collapse unimportant
UIElement
to 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
Start the conversation