摘要: Basically there are two possible ways to send a message, first using an overload of theRaisePropertyChangedand secondly by using theMessenger.Default.Sendcommand. For the address detail screen I used the messaging overload ofRaisePropertyChanged.public AddressViewModel SelectedAddress{ set { va... 阅读全文
posted @ 2013-12-18 10:43 MinieGoGo 阅读(159) 评论(0) 推荐(0) 编辑
摘要: You can get a different instance each time by passing a different key to the GetInstance method. However the instances will be cached, so if you do not want to keep them in the cache, you will need to call Unregister with the corresponding key.I was creating the VM upfront because the MainVM was sen 阅读全文
posted @ 2013-12-16 16:11 MinieGoGo 阅读(194) 评论(0) 推荐(0) 编辑
摘要: Essentially this one line of code will set the start page of the application. var navTo = new Uri("/Views/MainPage.xaml", UriKind.RelativeOrAbsolute); ((App)Current).RootFrame.Navigate(navTo);Then you will have to set start page inApp.Xaml.csas below. private void Application_Launching(ob. 阅读全文
posted @ 2013-12-12 05:55 MinieGoGo 阅读(160) 评论(0) 推荐(0) 编辑
摘要: xmlns:Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP8" 阅读全文
posted @ 2013-12-09 05:44 MinieGoGo 阅读(209) 评论(0) 推荐(0) 编辑
摘要: JSON values can be:A number (integer or floating point)A string (in double quotes)A Boolean (true or false)An array (in square brackets) - []An object (in curly brackets) - {}nullJSON ArraysJSON arrays are written inside square brackets.An array can contain multiple objects:{ "employees": 阅读全文
posted @ 2013-12-06 09:20 MinieGoGo 阅读(222) 评论(0) 推荐(0) 编辑
摘要: TODO 阅读全文
posted @ 2013-12-03 12:20 MinieGoGo 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Enumerating directly over an IDictionaryreturns a sequence of KeyValuePair structs:public struct KeyValuePair { public TKey Key { get; } public TValue Value { get; }}Enumerating over a nongeneric IDictionary returns a sequence of DictionaryEntry structs:public struct DictionaryEntry{ public objec... 阅读全文
posted @ 2013-12-01 16:04 MinieGoGo 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Option 1: You can afford deleting the rowIn other words, you don't have foreign key, or if you have them, your SQLite engine is configured so that there no are integrity exceptions. The way to go isINSERT OR REPLACE. If you are trying to insert/update a player whose ID already exists, the SQLite 阅读全文
posted @ 2013-11-29 09:58 MinieGoGo 阅读(427) 评论(0) 推荐(0) 编辑
摘要: This gives you the ability to create a trigger on an event and bind it to an ICommand on the view model. Assuming the DataContext is your view model, then the above will map the ‘MouseEnter’ event to ‘FooCommand’ on the view model.The only issue here, is that Invok... 阅读全文
posted @ 2013-11-27 17:09 MinieGoGo 阅读(1300) 评论(0) 推荐(0) 编辑
摘要: using System.Collections.Generic;using System.Windows;using System.Windows.Controls;using Microsoft.Phone.Controls; namespace ExtendedControls{ public class ExtendedSelector : LongListSelector { public static readonly DependencyProperty SelectedItemProperty = DependencyProper... 阅读全文
posted @ 2013-11-22 11:43 MinieGoGo 阅读(225) 评论(0) 推荐(0) 编辑