WindowsPhone開発のためのPrism+ReactiveProperty基本
WindowsPhone?開発のためのPrism+ReactiveProperty?基本 †
Prismとは †
- Microsoft Patterns & Practicesチーム製のMVVMフレームワーク
- 以下のプラットフォームをサポート
- WPF
- Silverlight
- Windows store app
- Windows Phone(←this Main Thama)
- Xamarin
- MS P&PからMVP主体のチームに移管された
Prism.StoreApps? †
Prism.StoreApps?の中から電話向けに説明
ReactiveProperty? †
What's ReactiveProperty? †
- Reactive Extensions(Rx)をベースにしたMVVMサポートライブラリ
- V ⇔ ViewModel? ⇔ Modelの間でRxをシームレスに繋ぐのが特徴
- 以下のクラスを提供
- ReactiveProperty?<T> class
- ReactiveCommand? class
- ReadOnlyReactiveCollection?<T> class
- その他拡張メソッドを提供
- INotifyPropertyChanged?の拡張メソッド
- ToReactivePropertyAsSynchronized? method
- ObserbleCollection?<T>の拡張メソッド
- ToReadOnlyReactiveCollection? method
- ViewModel?に定義するプロパティ
- public ReactiveProperty?<string> Name { get; private set; }のように定義
- コンストラクタで初期化