2015年12月18日 / kirito / 0 Comments
Some tips here:
1. If memory has PropertyChangedHandler left, make sure the list does not have any item.
2. Call Page.Bindings.StopTracking() in Page_Unloaded event
3. If you use x:Bind with MvvmLight, and using RelayCommand, you need to set RelayCommand enity to null in Page_Unloaded.
4. For checking the page is completely released, use the launch mouse recorder to open page and back multiple times. It is important to ensure every PageBack&GC cleared all no used memories.
=============Important Update=============
Don’t use Bindings.StopTracking()! When switch pages quickly, some xaml components would not be released!
Use
|
SimpleIoc.Default.Unregister<ViewModel>(key); |
Instead
2015年11月11日 / kirito / 0 Comments
The demo code like the follow below:
|
<VisualState x:Name="view720"> <VisualState.StateTriggers> <AdaptiveTrigger MinWindowWidth="720" /> </VisualState.StateTriggers> <VisualState.Setters> <Setter Target="Text.(Grid.ColumnSpan)" Value="3" /> <Setter Target="Text.(RelativePanel.Below)" Value="Image" /> </VisualState.Setters> </VisualState> |
So just add the parentheses around the attached property and it would be worked fine on StateTriggers.
2015年11月3日 / kirito / 0 Comments
If you want to use an Ethernet address(like 192.168.0.1) to send http request, you may meet the error:
A network capability is required to access this network resource.
So the solution here:
Package.appxmanifest -> Capabilities tab -> Check Private Networks (Client & Server) capability.