2. Problem
• The same code can’t reuse in these Platforms
• .NET Framework
• .NET for Windows Store apps
• Windows Phone
• Silverlight
• Xbox
• If want to cross platform, only do copy and paste
3. Solution
• The Portable Class Library project supports a subset of assemblies
from the .NET Framework, Silverlight, .NET for Windows Store apps,
Windows Phone, and Xbox 360
7. Supported Types and Members
• They must be shared across the target platforms you selected.
• 它們必須在您選取的目標平台之間共用。
• The must behave similarly across those platforms.
• 它們必須在這些平台上具有類似的行為。
• They must not be candidates for deprecation.
• 它們不能是要被取代的候選項。
• They must make sense in a portable environment, especially when
supporting members are not portable.
• 它們在可攜式環境中必須是合理的,尤其是支援成員無法移植時。
9. Supporting the Model-View-View Model
(MVVM) Pattern
• When you target the .NET Framework 4.5, .NET for Windows Store
apps, Silverlight, and Windows Phone
• System.Collections.ObjectModel.ObservableCollection<T>
• System.Collections.ObjectModel.ReadOnlyObservableCollection<T>
• System.Collections.Specialized.INotifyCollectionChanged
• System.Collections.Specialized.NotifyCollectionChangedAction
• System.Collections.Specialized.NotifyCollectionChangedEventArgs
• System.Collections.Specialized.NotifyCollectionChangedEventHandler
• System.ComponentModel.DataErrorsChangedEventArgs
• System.ComponentModel.INotifyDataErrorInfo
• System.ComponentModel.INotifyPropertyChanged
• System.Windows.Input.ICommand