Item |
Description |
Framework consolidation
|
Consolidated the following DLLs into Microsoft.Phone.dll.
Microsoft.Phone.dll contains the following:
- Microsoft.Phone.Shell.dll
- Microsoft.Phone.Controls.Navigation.dll
- Microsoft.Phone.Controls.dll
- Microsoft.Phone.Controls.WebBrowser.dll
- Microsoft.Phone.Notification.dll
- Microsoft.Phone.License.dll
- Microsoft.Devices.dll
- Microsoft.Phone.Execution.dll
- Microsoft.Phone.Info.dll
- Microsoft.Phone.Tasks.dll
|
Silverlight control template
|
Updated the Silverlight for Windows Phone control templates and
changed the default control styles and templates. Along with simple
cosmetic changes, the sizing of some controls has changed such that
any layouts depending on a specific height / width of a control may
be broken. In particular, since the MinHeight / MinWidth constraint
has been removed from some controls, you may see controls getting
"squashed" if the explicit height set in XAML is too small.
Therefore, you should review layouts with the new templates. In
general, applications should avoid setting explicit widths and
heights on elements unless strictly necessary. Relying on alignment
will generally give better results.
The following minor issues will be fixed in a future update:
- The ScrollViewer has the
HorizontalScrollBarVisibility set to Auto by
default. You can temporarily work around this by setting the
property to Disabled in your XAML. The horizontal scroll bar is
also too large when it appears.
- The Progress Bar works at runtime, but may have issues in the
designer when using the indeterminate mode. This is due to
differences in the XAML parser between runtime and design
time.
|
Application Manifest File
|
Changed the following elements in the WMAppManifest file:
- In the <App> element, Genre attribute,
the value changed from
NormalApp to
apps.normal .
- In the <App> element, RuntimeType
attribute, the value changed from
SilverLight to
Silverlight .
- In the <DefaultTask> element, removed the
PlaceHolderString attribute.
|
Phone Controls
|
Removed Microsoft.Phone.Controls.dll. You must remove the
following:
- References to Microsoft.Phone.Controls.
- References to the xmlns:mpc namespace declaration.
- Any styles that have a TargetType set to "mpc:
…" in the app.xaml.
Additonal work items to consider:
- Use the default ListBox style in place of
PhoneListBox (delete the Style tag).
- Instead of PhoneListBoxItemLayout, you can
copy the XAML code from the app.xaml file of an old project that
used the PhoneListBox and manually add it to your
project.
- Use the ToggleButton control and apply a
custom template in place of ToggleSwitch and
ToggleImageButton.
|
Page and Frame Classes/ Navigation/Controls
|
Moved phone-specific members of Page and
Frame classes to new classes,
PhoneApplicationPage and
PhoneApplicationFrame in the
Microsoft.Phone.Controls namespace. Your builds
will break if you use the old types.
API changes as follows:
- PhoneApplicationFrame and
PhoneApplicationPage are new classes.
- SupportedOrientations property moved from
Page class to
PhoneApplicationPage class.
- ApplicationBar property moved from
Page class to
PhoneApplicationPage class.
- PhoneApplicationState property is new. It
helps to save transient data on your page.
- Use the State property in
PhoneApplicationPage to store page-specific state
instead of Stream property in
PhoneNavigationEventsArgs.
- Microsoft.Phone.Navigation namespace has been
removed.
- ObscuredEventArgs is a new class in
Microsoft.Phone.Controls namespace. It handles
obscurity changes in your application.
- Removed the following items from
Microsoft.Phone.Controls namespace:
- Layout enumeration
- ListView class
- ListViewItem class
- NavigatedEventArgs class
- NavigationEventArgs class
- ToggleControlButton class
- ToggleControlSwitch class
- Added NavigatingCancelEventArgs class and
NavigationMode enumeration to
System.Windows.dll.
|
WindowsPhoneEvents
|
Removed the WindowsPhoneEvents class and
replaced with PhoneApplicationService class.
Renamed Pause and Resume with
Activated and Deactivated.
Renamed ApplicationIdleDetection with
ApplicationIdleDetectionMode and
UserIdleDetectionMode.
|
Manipulation EventArgs in Silverlight
|
Changed the following properties:
- Removed the
Manipulation.CompletedEventArgs.IsTapEvent
property.
- Changed Translation properties to populate
only when a pan is detected. This change affects the following
properties:
-
ManipulationDeltaEventArgs.CumulativeManipulation.Translation
-
ManipulationDeltaEventArgs.DeltaManipulation.Translation
-
ManipulationCompleted.TotalManipulation.Translation
Previously, these values would be adjusted on every finger move and
did not respect the system defined dead zones. With this change,
the Translation properties are only populated once
the user has moved a certain number of pixels (as defined by
ITouchSession) away from the original contact
point.
- Changed the Scale property to return 1 instead
of 0. This change affects the following properties:
-
ManipulationDeltaEventArgs.DeltaManipulation.Scale
-
ManipulationCompleted.TotalManipulation.Scale
Previously, when a Pinch/Stretch gesture was detected and the scale
has not changed, the DeltaManipulation.Scale
property would return 0. This made certain mathematical operations
more difficult than necessary. Also, if the user started a stretch
and then pinched back to the original contact points, the Scale
would also report 0 which was confusing. It now returns 1 to
signify the scale is 1:1 in relation to its original size. This
change will affect any application that uses the
IsTapEvent property, or includes code to detect
and filter out scale values of 0 or relies upon non-filtered
translations. To solve this issue, use OnClick
instead of IsTapEvent, or check for a translation
and scale of 0 in
ManipulationCompleted.TotalManipulation or remove
code that may have been adjusting Scale assuming a
0 delta instead of 1.
|
Push Notifications APIs
|
Changed push notification APIs. These changes apply to
Microsoft.Phone.Notification and Microsoft.Phone.Shell. The
following list shows the summary of changes:
- Changed class, method, and member variable names.
- Removed certain delegates.
- Removed most of the custom exceptions.
- Live tile URLs changed to domain restriction.
For more information, see How to: Set Up a Notification
Channel for Windows Phone and How to: Send a Push
Notification from a Web Service for Windows Phone.
|
Network state API
|
Changed the following namespace:
Old namespace
Microsoft.Devices.NeworkInformation to new
namespace
Microsoft.Phone.Net.NetworkInformation.
|
LicenseInfo Class
|
Changed the following namespace and class names:
- Old namespace Microsoft.Phone.License to new
namespace Microsoft.Phone.Marketplace.
- Old class name LicenseInfo to new class name
LicenseInformation. This class contains the
IsTrial method.
|
WebBrowser
|
Changed the following APIs:
- WebBrowser is now a sealed class. You cannot
inherit from it.
- IsScriptEnabled, Source, and
Base are now dependency properties.
- NavigatedEventArgs change to
NavigationEventArgs.
|
PhoneNumberChooserTask and PhotoChooserTask
|
Modified the Chooser APIs, such as
PhoneNumberChooserTask and
PhotoChooserTask, to use delegates for returning
data back to the calling application. The
Completed event in those classes is fired when
data is returned back to the application. You can assign delegates
to the Completed event to retrieve the returned
data. You must remove any references to ITask.
The following is a code example:
|
private PhoneNumberChooserTask phnTask = new PhoneNumberChooserTask();
phnTask.Completed += new EventHandler<PhoneNumberResult>(OnPhoneNumberResult);
void OnPhoneNumberResult(object sender, PhoneNumberResult result) {
// implementation here
}
|
|
Accelerometer
|
If you used Microsoft.Devices.Sensors
namespace, you must change your implementation to use the latest
Accelerometer class design.
Here is the summary of changes:
- Removed abstract base class Sensor.
- Removed generic SensorData<T>
class.
- Removed AccelerometerReading structure.
- Accelerometer is now a private/sealed
class.
- Changed AccelerometerReadingAsyncEventArgs to
AccelerometerReadingEventArgs.
- Replaced AccelerometerStartFailedException and
AccelerometerStopFailedException with
AccelerometerFailedException.
- Renamed HResult property of
AccelerometerFailedException to
ErrorId.
|
Interlocked Class in System.Threading Namespace
|
In the Silverlight System.Threading namespace,
the 64-bit managed Interlocked methods are not
supported. Use the 32-bit methods for your application.
The following is a list of the unsupported methods:
- Interlocked.Add(Int64, Int64)
- Interlocked.CompareExchange(Int64, Int64,
Int64)
- Interlocked.Decrement(Int64)
- Interlocked.Exchange(Int64, Int64)
- Interlocked.Increment(Int64)
|
Reactive Extensions for .NET Framework
|
Changed namespace from System.Reactive to
Microsoft.Phone.Reactive. The new assembly is
Microsoft.Phone.Reactive.dll. You must update existing projects to
use the new reference assembly. The following namespaces were
consolidated into a single new namespace
Microsoft.Phone.Reactive:
- System
- System.Collections.Generic
- System.Linq
- System.Concurrency
- System.Disposable
Note: |
System.Observable.dll and IObservable and
IObserver interfaces in System
namespace did not change. |
|
System.Windows.Browser
|
Removed System.Windows.Browser.dll because this is not
supported. The HTML DOM bridge APIs in
System.Windows.Browser namespace are not supported
in Windows Phone.
The HttpUtility class is supported in Windows
Phone. It is moving to System.Windows.dll in
System.Net namespace. If your application uses
HttpUtility class, change the namespace to
System.Net.
Any Windows Phone application that started as a Silverlight 3
application will likely be impacted by this change. The default
unhandled exception event handler in the Silverlight 3 application
template used a type from System.Windows.Browser.dll.
|
Application Bar
|
Changed the following Application Bar APIs:
- The type of the
PhoneApplicationPage.ApplicationBar property
changed from ApplicationBar class to
IApplicationBar interface. The member variable of
the PhoneApplicationPage used to be of type
ApplicationBar, it has been changed to type
IApplicationBar. Since the
ApplicationBar class implements the
IApplicationBar interface, the code you wrote
before will still work.
The interface change should not affect normal application code that
creates or modified the application bar through XAML or code. In
cases where the application bar objects are cached, you should use
an interface. Here is an example code:
Old:
|
ApplicationBar bar = this.ApplicationBar;
|
New:
|
IApplicationBar bar = this.ApplicationBar;
|
- The ApplicationBarIconButton class has a new
required Text property. You must set this property
before you add the button to the application bar; otherwise, you
will get an InvalidOperationException.
|
Orientation and Layout Updates
|
Orientation: Previously, only the page was
rotated, but not the entire application frame. There was a
two-phase event system for detecting changes in orientation,
[On]OrientationChanging followed by
[On]OrientationChanged. In this release, the
entire application frame rotates and there is only a single
event/override-[On]OrientationChanged. You should
remove all handlers for the OrientationChanging
event.
System Chrome: There are fewer layout passes to
handle the differences in layout when page transitions occur. There
is no visible effect as a result of this change.
The updates also provided the correct behavior for
TransformToVisual and
FindElementsInHostCoordinates APIs. Make sure that
you remove any code that previously provided workarounds for these
APIs.
|
User Interface
|
Removed UIElement.Effect and the corresponding
effects DropShadow and Blur.
|
New Exception for Xbox LIVE games
|
If a game update is available, Xbox LIVE services will not be
available until the player installs the game update. When a game
update is available, GamerServicesDispatcher will
throw a GameUpdateRequiredException when this
method is called from a previous version of the game. Games must
handle the GameUpdateRequired exception on Windows
Phone and allow the player to confirm requests to update the
application.
|
Application Activation Behavior
|
A second launch of an application that is already running or
deactivated causes the termination of the first instance of the
application. Any code that assumed a resume of the application
should be re-evaluated. Your code should not assume that launching
the second instance will bring the previously running instance back
to the foreground. For more information, see Execution
Model Overview for Windows Phone.
|
Microsoft.Phone.Shell namespace
|
Changed the following enumerations:
- Old DownloadInterval to new
UpdateInterval.
- Old DownloadRecurrence to new
UpdateRecurrence.
|
XNA Framework
|
- While the XNA Framework supports Touch for Windows Phone, it no
longer supports Touch for Windows-based games.
- Texture2D.SaveAsGif has been removed.
- Developers must deselect D3DX analysis to run
the PIX for Windows performance tool.
- The GamerServiceType parameter has been
removed from
GamerServicesDispatcher.Initialize.
- GetPartnerToken now requires the
AudienceURI parameter. This parameter cannot be
null or an empty string.
- In the Windows Phone Emulator, the
SkinnedEffect bone index channel must be specified
as one of the integer vertex element formats - either
Byte4, Short2, or
Short4. This same set of integer data formats
cannot be used for other shader input channels such as colors,
positions, and texture coordinates on the emulator.
- In a previous release, the emulator did not support the
VertexElement.Byte4 format for the bone index
channel, and we advised developers to override
ModelProcessor.ProcessVertexChannel and convert
bone index channel data from Byte4 to Vector4. This workaround will
not work in this release and must now be removed.
Any vertex format can be used with any shader input channel on
Windows Phone devices, Xbox 360, and Windows.
|