ࡱ > bjbj
4 h h
y y c c c c c w w w 8 w t G - - - - " * 6 V d c > > > c c - - > c - c - > f 0 - B w 0 ~ D 0 \ h \ \ c 0 > > > > > > > | > > > > > > > \ > > > > > > > > > y ) : Breaking Changes Since Beta 2
This topic discusses the changes made to the Silverlight runtime and Silverlight tools between the Microsoft Silverlight 2 Beta 2 and the final release of Silverlight 2. The changes discussed in this article are focused on changes that might cause your older Silverlight-based applications to now fail or behave differently, not on new features/enhancements for this release.
NoteCorrections/Additions to this document (if any) are listed HYPERLINK "http://go.microsoft.com/fwlink/?LinkId=119604"here.
NoteApplications built with Beta 2 will not run on final runtime builds. End users will see a message informing them that the application was built with an obsolete version of Silverlight. You must rebuild your Beta 2 applications see HYPERLINK \l "important" here for more information.
TipGiven the large number of API changes, particularly those listed in the Miscellaneous API Changes section, you may want to search this document by using CTRL+F.
Contents:
HYPERLINK \l "Important" Important! Migrating Older Code to the Newer Release
HYPERLINK \l "contentpresenter_now_derives" ContentPresenter now derives from FrameworkElement instead of Control
HYPERLINK \l "Layout_Rendering" Layout Rendering Slightly Changed
HYPERLINK \l "cross_domain" Cross domain hosts of Silverlight must set the right MIME type for XAP (application/x-silverlight-app)
HYPERLINK \l "exceptions_now_thrown" Exceptions now thrown in HttpWebRequest.EndGetResponse()
HYPERLINK \l "font_uri" Font URI is Restricted to Assembly Resource
HYPERLINK \l "browser_HtmlElementCollection" Browser.HtmlElementCollection replaced with by Browser.ScriptObjectCollection
HYPERLINK \l "exceptions_when_changing" Exceptions When Changing Some Properties on an Active Animation
HYPERLINK \l "system_windows_controls_extended_dll" System.Windows.Controls.Extended.dll renamed to System.Windows.Controls.dll
HYPERLINK \l "visualstatemanager_changes" VisualStateManager Changes
HYPERLINK \l "keydown" KeyDown Sent Synchronously
HYPERLINK \l "measureoverride" MeasureOverride/ArrangeOverride on Canvas Now Sealed
HYPERLINK \l "uritypeconverter_moved" UriTypeConverter moved to System.dll
HYPERLINK \l "htmlpage" HtmlPage.UnregisterScriptableObject Removed
HYPERLINK \l "renderingeventargs" RenderingEventArgs Changes
HYPERLINK \l "contentpresenter" ContentPresenter and ContentControl Changes
HYPERLINK \l "removal_of_filedialogfileinfo" Removal of FileDialogFileInfo Type and OpenFileDialog.SelectedFile(s) Properties
HYPERLINK \l "removal_of_fullAccess" Removal of FullAccess Option on the ExternalCallersFromCrossDomain attribute in the Silverlight 2 application manifest
HYPERLINK \l "keyframecollection_changes" KeyFrameCollection Changes
HYPERLINK \l "request_stream_must_be_closed" Request stream must be closed before calling HttpWebRequest.BeginGetResponse()
HYPERLINK \l "htmlwindow_references" HtmlWindow references on Safari/Mac will no longer evaluate to true
HYPERLINK \l "address_property_removed" Address property removed from all WebClient EventArg classes
HYPERLINK \l "constructors_made_internal" Constructors Made Internal
HYPERLINK \l "exception_type_change" Exception type change for System.Xml exception type
HYPERLINK \l "cannot_create_classes" Cannot create classes in XAML that do not have accessible constructors
HYPERLINK \l "get_AG_E_UNKNOWN_ERROR" Get AG_E_UNKNOWN_ERROR in Silverlight 2 but not in Silverlight 1
HYPERLINK \l "platform_looks" Platform looks for generic.xaml as a resource at themes/generic.xaml
HYPERLINK \l "http_polling" HTTP Polling Duplex OM Changes and Reengineering
HYPERLINK \l "breaking_change_to_silverlight" Breaking change to Silverlight native hosting IXcpControl COM interface
HYPERLINK \l "Content_type_is_allowed" Content-Type is allowed on cross domain request by default
HYPERLINK \l "enforcing" Enforcing delegate type check when two delegate objects are combined
HYPERLINK \l "Miscellaneous" Miscellaneous API Changes
Important! Migrating Older Code to the Newer Release
If you are migrating Silverlight applications that were created for the Silverlight 2 Beta 2 release or earlier to the final release of Silverlight 2, you are going to need to get the newest Silverlight 2 Tools for Visual Studio 2008 and recompile your project(s).
Get the newest version of Silverlight 2 Tools for Visual Studio 2008. You can get these tools from the SDK or online at HYPERLINK "http://go.microsoft.com/fwlink/?LinkID=89558"Getting Started. You may have to uninstall any old tools before doing this install.
Open your old project (e.g. .csproj file). A dialog will come up notifying you that your project was created with an older version of Silverlight tools and asks you if you want to upgrade your project. Click the Yes button.
Open all of the HTML files and change:
The Silverlight MIME type from application/x-silverlight-2-b1 or application/x-silverlight-2-b2 to application/x-silverlight-2.
The Silverlight installation URL from HYPERLINK "http://go.microsoft.com/fwlink/?LinkID=124807" http://go.microsoft.com/fwlink/?LinkID=108182 or HYPERLINK "http://go.microsoft.com/fwlink/?LinkID=115261" http://go.microsoft.com/fwlink/?LinkID=115261 to HYPERLINK "http://go.microsoft.com/fwlink/?LinkID=124807" http://go.microsoft.com/fwlink/?LinkID=124807.
Note: some templates replaced HYPERLINK "http://go" http://go with HYPERLINK "http://go2" http://go2. Be sure to search for both.
Debug. Many of the breaking changes you are likely to encounter can be found in this document.
ContentPresenter now derives from FrameworkElement instead of Control
Who Is Affected: Applications that use ContentPresenter or objects derived from ContentPresenter.
Summary
Because ContentPresenter now derives from FrameworkElement, the following properties are no longer exposed by ContentPresenter:
Background
BorderBrush
BorderThickness
DefaultStyleKey
FontFamily
FontSize
FontStretch
FontStyle
FontWeight
Foreground
HorizontalContentAlignment
IsEnabled
IsTabStop
Padding
TabIndex
TabNavigation
Template
VerticalContentAlignment
In addition, some APIs were removed from ContentPresenter (see HYPERLINK \l "contentpresenter" ContentPresenter and ContentControl Changes).
Fix Required
Remove all these obsolete properties from your ContentPresenter objects, which will likely require you to re-work some of your code to restore your previous UI rendering.
Layout Rendering Slightly Changed
Who Is Affected: All content using layout might be rendered slightly differently because layout no longer causes elements to be rendered at sub-pixel locations.
Summary
The layout system in Silverlight has been modified to round final measure and arrange values to integers when placing elements on the screen (pixel snapping). The result is crisper lines, more consistent rendering look, and fewer rendering artifacts.
Layout rounding will be *on* by default, but there is a new inherited property on UIElement called UseLayoutRounding that can be set to false if the old layout behavior is desired.
NoteIt is possible that this change will affect how your animations render, in which case you might want to set UseLayoutRounding to false.
NoteThis change does not affect transforms. If you apply a transform to an element, it may still be rendered at a sub-pixel location.
Cross domain hosts of Silverlight must set the right MIME type for XAP (application/x-silverlight-app)
Who Is Affected: Anyone serving Silverlight 2 apps from cross domain:
Via a web server that is not IIS7
Via a web server where the MIME type for .XAP files is incorrectly configured
Summary/Fix Required
When the XAP is served from a different domain than the host HTML page, Silverlight will validate that the MIME type (Content-Type response header) returned on the HTTP response is application/x-silverlight-app.
Apache (and perhaps other servers) tend to serve unrecognized content as text/plain, and therefore will be affected by this change. You are required to add an entry for the Silverlight XAP MIME type to your .htaccess file -- e.g. AddType application/x-silverlight-app xap.
NoteIIS7 shipped with the right MIME type configurations for Silverlight XAPs. No action is required if you are using IIS7.
Exceptions now thrown in HttpWebRequest.EndGetResponse()
Who Is Affected: Silverlight 2 applications that use HttpWebRequest.
Summary/Fix Required
For HttpWebRequest:
Before:
Some security exceptions (e.g. cross-scheme violations) were being raised in HttpWebRequest.BeingGetResponse()
All other request error conditions were being returned as 404s.
Now:
Error conditions are now raised as exceptions in HttpRequest.EndGetResponse().
Request security errors (e.g. requests not allowed by cross domain policy) raise SecurityExceptions
Non-successful requests (e.g. those that returned 404s) raise WebExceptions. The WebException.Response is set to HttpStatusCode.NotFound. This is compatible with the desktop.
Font URI is Restricted to Assembly Resource
Who Is Affected: Silverlight 2 Beta1 or Beta 2 applications (not Silverlight 1.0 applications) that reference fonts (or zip of fonts) via the URI syntax in the Control.FontFamily, TextBlock.FontFamily or Glyphs.FontUri attributes and where the fonts are not embedded within the assembly (dll) of the control or application.
Fix Required
You can specify a font (or in some cases a zip of fonts) in URI format via the Control.FontFamily, TextBlock.FontFamily and the Glyphs.FontUri attributes. If you are, you will need to ensure your font is marked as a "resource" in the project system.
Browser.HtmlElementCollection replaced with by Browser.ScriptObjectCollection
Who Is Affected: Silvlierlight 2 Beta 2 applications using HTML bridges HtmlElementCollection will break. The type has been replaced with a new type: ScriptObjectCollection.
Summary
The System.Windows.Browser.HtmlElementCollection type was changed to ScriptObjectCollection. All previous references to HtmlElement on the collection have been changed to instead reference ScriptObject. Other areas of the HTML bridge that previously used HtmlElementCollection (i.e. HtmlElement.Children) have been switched to instead return a ScriptObjectCollection. Note that if you retrieve an item from the new ScriptObjectCollection that actually is an HtmlElement, you can still cast the return value back to an HtmlElement.
The specific benefit from this change is that across all browsers you can now access both element, and non-element, DOM nodes contained in a node collection. We made this change because there is no consistent cross-browser implementation of an HtmlElement-specific collection type.
Fix Required
Change existing references to HtmlElementCollection to ScriptObjectCollection. If your existing code was working with HtmlElement return values you will need to explicitly cast the items returned from a ScriptObjectCollection to an HtmlElement. Since the collection type is now ScriptObjectCollection it is likely that on different browsers the ordinality of the resulting collection will also change. Any code that was relying on fixed offsets into the collection may need to be changed to account for non-element nodes (e.g. text nodes such as whitespace, etc) in the collection.
Beta 2
[c#]
HtmlElement myHtmlElement = someOtherHtmlElement.Children[5];
Release
[c#]
HtmlElement myHtmlElement = (HtmlElement)someOtherHtmlElement.Children[5]; //assuming the desired element is still at offset 5
Exceptions When Changing Some Properties on an Active Animation
Who Is Affected: Silverlight 1.0 and 2.0 applications that change properties on active animations.
Summary
When you change one of the properties listed below on an active Storyboard, an exception is raised at runtime with this message: Operation is not valid on an active Animation or Storyboard. Root Storyboard must be stopped first."
The list of properties that cannot be modified on an active animation or Storyboard are listed below:
Attached Properties
Storyboard.TargetNameProperty
Storyboard.TargetPropertyProperty
Properties on derived classes from Timeline of a collection type
Storyboard.Children (you cannot add/remove animations from an active storyboard)
ColorAnimationUsingKeyFrames.KeyFrames
DoubleAnimationUsingKeyFrames.KeyFrames
PointAnimationUsingKeyFrames.KeyFrames
ObjectAnimationUsingKeyFrames.KeyFrames
Make sure you stop the Storyboard before changing one of these properties. You can do this by using the Storyboard.Stop method.
System.Windows.Controls.Extended.dll renamed to System.Windows.Controls.dll
Who Is Affected: Anyone who uses the extended controls (Calendar, DatePicker, TabControl and GridSplitter).
Fix Required
Change all references from System.Controls.Extended to System.Windows.Controls and recompile your application.
VisualStateManager Changes
Who Is Affected: Silverlight 2applications that use VisualStateManager.
Summary
VisualTransition.Duration has changed to VisualTransition.GeneratedDuration. This value will now only affect the generated transitions, and not the VisualTransition.Storyboard.
Example:
In the below XAML, the VSM generated animations for the Pressed-> Normal transition will be created with 1 second durations. The explicit transition Storyboard with its blue ColorAnimation will still be 2 seconds.
[xaml]
...
...
VisualStateManager.CustomVisualStateManager should be set on the root visual of the ControlTemplate or UserControl, not the Control/UserControl itself. In the example below, the custom visual state manager is set on the Grid, the ControlTemplates root visual.
[xaml]
...
KeyDown Sent Synchronously
Who Is Affected: If you previously have been doing operations in the KeyDown event that could cause reentrancy into the Silverlight control, such as calling into the HtmlPage.Window.Alert function, this will no longer be supported.
Summary
We switched over our keyboard handling for character input to use the concept of the WM_CHAR windows message. This is used for TextBox/PasswordBox text entry to enable scenarios such as entering AltGr keystrokes. In order for us to do this, the KeyDown event had to be sent synchronously for managed code.
MeasureOverride/ArrangeOverride on Canvas Now Sealed
Who Is Affected: Silverlight 2 Beta 2 Applications that use MeasureOverride and ArrangeOverride on Canvas.
Summary
MeasureOverride and ArrangeOverride virtual methods on Canvas are sealed. These methods were already sealed for Grid and StackPanel. Any custom panel that requires its own layout logic should subclass Panel.
UriTypeConverter moved to System.dll
Who Is Affected: Silverlight 2 managed code referencing the UriTypeConverter class.
Fix Required
UriTypeConverter was moved from System.Windows.Controls.dll to System.dll where it resides on the desktop framework. Applications that reference it just need to be recompiled.
HtmlPage.UnregisterScriptableObject Removed
Who Is Affected: Those using HtmlPage.UnregisterScriptableObject.
Fix Required
Alternative to using HtmlPage.UnregisterScriptableObject, developers can now re-use the same script registration key for RegisterScriptableObject. This allows developers to change the underlying managed object associated with a scriptable entry point.
RenderingEventArgs Changes
Who Is Affected: Silverlight 2 managed code referencing the RenderingEventArgs class.
Summary
The following changes have been made to class RenderingEventArgs
RenderingEventArgs is moved from System.Windows to System.Windows.Media
RenderingEventArgs.ctor() is now internal
System.Windows.RenderingEventHandler has been removed.
ContentPresenter and ContentControl Changes
Who Is Affected: Silverlight 2 managed code that uses either the ContentPresenter or ContentControl classes.
Summary
The following properties were removed from ContentPresenter and ContentControl.
TextAlignment
TextDecorations
TextWrapping
Removal of FileDialogFileInfo Type and OpenFileDialog.SelectedFile(s) Properties
Who Is Affected: Silverlight 2 applications which use the OpenFileDialog.
Summary
The System.Windows.FileDialogFileInfo type is being removed. Its functionality is now being exposed via its base System.IO.FileInfo type to transparent code within Silverlights sandbox.
System.Windows.Controls.OpenFileDialog has a couple properties which consume and expose FileDialogFileInfo. They were modified to return the FileInfo type.
In addition, the property names SelectedFile and SelectedFiles were also changed to File and Files.
Fix Required
Beta 2
[c#]
// Returns a File object for the selected file. If multiple files are selected, returns the first selected file
public FileDialogFileInfo SelectedFile { get; }
// Returns a collection of File objects for the selected files
public IEnumerable SelectedFiles { get; }
Release
[c#]
// Returns a File object for the selected file. If multiple files are
// selected, returns the first selected file
public FileInfo File { get; }
// Returns a collection of File objects for the selected files
public IEnumerable Files { get; }
Sample usage of OpenFileDialog with this change:
[c#]
openFileDialog = new System.Windows.Controls.OpenFileDialog();
openFileDialog.Multiselect = false;
openFileDialog.Filter = "Text Files (*.txt)|*.txt|All files (*.*)|*.*";
bool? retval = ofd.ShowDialog();
if (retval != null && retval == true) {
// Get the filename
string filename = openFileDialog.File.Name;
// Open the file
System.IO.Stream filestream = openFileDialog.File.OpenRead();
// Do something with the filestream
// Close it
}
Removal of FullAccess Option on the ExternalCallersFromCrossDomain attribute in the Silverlight 2 application manifest
Who Is Affected: Only Silverlight 2 applications that use this combination of features:
XAP deployed on a different domain than the host HTML page, and
with application manifest (AppManifest.xaml) specifying ExternalCallersFromCrossDomain=FullAccess on the root element are affected.
Summary
The ability for arbitrary scripts to walk the element tree, register for and get notified on events, and use the Silverlight 1.0 Downloader from script has been curtailed in a cross-domain app deployment scenario. The application manifest previously supported the ability for app author to designate the ExternalCallersFromCrossDomain attribute with the values NoAccess (default in cross-domain), ScriptableOnly and FullAccess. Support for the FullAccess option has been removed.
Many of the purposes you would have relied on the FullAccess option can now be fulfilled via the Scriptable object feature, with minor additional work on your part.
KeyFrameCollection Changes
Summary and Fix
Virtual methods Add, Contains, Indexof, Insert, Remove, get_Item, set_Item are no longer declared on the following collections:
ColorKeyFrameCollection.
DoubleKeyFrameCollection
ObjectKeyFrameCollection
PointKeyFrameCollection
PointKeyFrameCollection
StrokeCollection
Request stream must be closed before calling HttpWebRequest.BeginGetResponse()
Who Is Affected: Silverlight 2 applications that use HttpWebRequest.BeginGetResponse().
Summary
You must close the request stream on an HttpWebRequest before calling BeginGetResponse(). Previously BeginGetResponse() would close an open request stream.
HtmlWindow references on Safari/Mac will no longer evaluate to true
Who Is Affected: Code that uses System.Windows.Browser.HtmlWindow and that expects two HtmlWindow references pointing at the same DOM window to evaluate to true will now return false when running on Safari 2 or Safari 3 on Mac.
Summary
For example:
Create a page with one iframe
Use the bridge to get two references to the iframe:
HtmlWindow myWin = document.GetElementById(myIframe);
HtmlWindow myWin2 = document.GetElementById(myIframe);
With the change the following comparison will now return false on Safari 2/3 Mac:
bool areEqual = (myWin == myWin2);
Address property removed from all WebClient EventArg classes
Fix Needed
If you were depending on the Address property, you can work around this breaking change in the following way:
Beta 2
[c#]
void Callback(object sender, DownloadStringCompletedEventArgs args)
{
DebugPrint(args.Address.ToString());
}
void MakeCall(Uri uri, object userState)
{
webClient.DownloadStringAsync(uri, userState);
}
Release
[c#]
class DownloadState
{
public DownloadState() {}
public Uri Address;
public object ActualUserState;
}
void Callback(object sender, DownloadStringCompletedEventArgs args)
{
DownloadState userState = (DownloadState)args.UserState;
DebugPrint(userState.Address.ToString());
}
void MakeCall(Uri uri, object userState)
{
Uri absoluteUri = uri;
if (absoluteUri.IsAbsoluteUri == false)
{
absoluteUri = new Uri(new Uri(webClient.BaseAddress), absoluteUri);
}
DownloadState downloadState = new DownloadState();
downloadState.Address = absoluteUri;
downloadState.ActualUserState = userState;
webClient.DownloadStringAsync(uri, downloadState);
}
Constructors Made Internal
Summary
You can no longer create the objects listed below because their associated constructors have been made internal:
SizeChangedEventArgs
TextChangedEventArgs
DownloadProgressEventArgs
ExceptionRoutedEventArgs
KeyEventArgs
MouseButtonEventArgs
MouseEventArgs
StartupEventArgs
Expression
GeneralTransform
Geometry
ImageSource
PathSegment
SetterBase
Transform
BindingExpressionBase
InputMethod
Exception type change for System.Xml exception type
Summary
In the methods/constructors shown below, we will no longer be checking for null arguments. As a result, the usage of null arguments will result in a NullReferenceException. In previous builds of Silverlight, use of a null argument would result in an ArgumentNullException being thrown. There is no change in functionality, just the type of exception that is being thrown.
XmlReader.IsName method
XmlReader constructor
XmlReader.MoveToAttribute method
XmlReader:IsNameToken method
XmlNamespaceManager constructor
XmlReader.Nametable.Add method
XmlReader.Nametable.Get method
XmlCharCheckingWriter.WriteQualifiedName method
XmlCharCheckingWriter.WriteDocType method
XmlConvert.ToBoolean method
XmlConvert.ToDouble method
XmlConvert.ToSingle method
XmlConvert.ToDateTime method
Cannot create classes in XAML that do not have accessible constructors
Summary
Certain classes that were defined by the Silverlight runtime were creatable in XAML, even though they did not have an accessible constructor. With this change, you can no longer instantiate those classes in XAML.
These classes (which only have internal constructors) can no longer be created in XAML:
TriggerCollection
InlineCollection
RowDefinitionCollection
ColumnDefinitionCollection
RoutedEventARgs
MouseButtonEventArgs
KeyEventARgs
ErrorEventArgs
UIElementCollection
Downloader
InternalWebRequest
MultiScaleSubImageCollection
MediaAttribute
MediaAttributeCollection
ExceptionROutedEventArgs
DownloadProgressEventArgs
StartupEventArgs
TextBoxBase
TextBoxView
TextChangedEventArgs
RuntimeHostEventArgs
SizeChangedEventArgs
RenderingEventArgs
ItemCollection
CorePropertyChangedEventArgs
IsEndabledChangedEventARgs
TypeProxy
ManagedObjectReference
AutomationPropertiesEnum
DependencyPropertyProxy
Get AG_E_UNKNOWN_ERROR in Silverlight 2 but not in Silverlight 1
Summary
In previous versions of Silverlight, when media failed because a media file was not available, a MediaFailed event was fired but if the MediaFailed event was not handled by the developer, the end user would not be notified of the failure. Now when a handler is not hooked up to the MediaFailed event, the error bubbles up to the default OnError handler of the plug-in and AG_E_UNKNOWN_ERROR is displayed to the user.
Fix Required
Attach the MediaFailed event to your MediaElement objects and handle errors as appropriate.
Platform looks for generic.xaml as a resource at themes/generic.xaml
Summary
The platform now looks for the generic.xaml resource dictionary as an assembly resource in the "themes" directory rather than the root directory.
Fix Required
Move your generic.xaml resource underneath the "themes" folder under ControlLib in Solutions Explorer in Visual Studio.
HTTP Polling Duplex OM Changes and Reengineering
Who Is Affected: This will impact anyone using the HTTP Polling Duplex channel.
Summary
PollTimeout setting on the server side (PollingDuplexHttpBinding and PollingDuplexBindingElement) has been renamed to ServerPollTimeout
PollTimeout setting on the PollingDuplexBindingElement (client side) has been renamed to ClientPollTimeout.
PollTimeout setting on the PollingDuplexHttpBinding (client side) has been cut. In most scenarios, it should not be necessary to change this. If a change is necessary, it can be achieved through the ClientPollTimeout on the PollingDuplexBindingElement.
Client-side support has been cut from the non-Silverlight (server-side) polling duplex assembly (i.e. BuildChannelFactory will throw a NotSupportedException). That is, in RTM, the client side for polling duplex must be Silverlight (and the server side must be the regular .NET Framework, but this restriction was already in place in Beta2).
Default timeouts have been changed for the Duplex channel. For most common scenarios, the new out-of-the-box defaults should be appropriate and there is no need to change them.
An error (404) on a polling request will cause the duplex channel to fault.
Various invalid messages used to be ignored by the Duplex stack but will now be rejected.
If any HTTP error (404,500,) is encountered during a SOAP call, a CommunicationException is now thrown instead of a ProtocolException.
Breaking change to Silverlight native hosting IXcpControl COM interface
Who Is Affected: Applications that host Silverlight 2 natively via its COM APIs.
Summary
The following splash screen related properties added to IXcpControl interface are being broken out and being moved to a new IXcpControl2 interface:
get_OnSourceDownloadComplete
get_OnSourceDownloadProgressChanged
get_SplashScreenSource
put_OnSourceDownloadComplete
put_OnSourceDownloadProgressChanged
put_SplashScreenSource
In addition, the LoadRuntime function is also being moved to IXcpControl2.
Content-Type is allowed on cross domain request by default
Summary
Both supported cross domain policy files (crossdomain.xml, clientaccesspolicy.xml) no longer need to explicitly allow the Content-Type request header. The Content-Type header is always settable on POST xdomain requests, as long as the request itself is allowed by a cross domain policy file.
In addition, the LoadRuntime function is also being moved to IXcpControl2.
Fix Required
Previously you needed to specify Content-Type in the headers whitelist. Now, Content-Type is always allowed, so the bolded Content-Type attribute value is no longer required just for setting the Content-Type (see below).
clientaccesspolicy.xml
Old version that explicitly listed Content-Type as settable. (This file still works in SL2 RTM.)
[xaml]
New version that still allows Content-Type to be set
[xaml]
crossdomain.xml
Old version that explicitly listed Content-Type as settable. (This file still works in SL2 RTM.):
[xaml]
New version that still allows Content-Type to be set:
[xaml]
Enforcing delegate type check when two delegate objects are combined
Who Is Affected: Code that bypass the delegate type check in Delegate.Combine by calling MulticastDelegate.CombineImpl directly.
Fix Required
If you want to combine two delegate objects they should be of the exact same delegate type.
Miscellaneous API Changes
UIElement.HitTest method has moved to the VisualTreeHelper class and renamed to VisualTreeHelper.FindElementsInHostCoordinates.
Moved DependencyPropertyChangedEventHandler delegate type from System.Windows.Controls to System.Windows namespace.
Control.IsTabStop defaults to true. Now, all Control derived classes (directly or indirectly) have IsTabStop set to true except, UserControl, HyperlinkButton, ScrollViewer and ListBox.
WebHeaderCollection.Keys property was replaced with the AllKeys property.
WebHeaderCollection.Headers property was renamed to Keys.
WebRequest.RegisterPrefix() now returns false in failure cases per the interface contract from the desktop framework rather than throwing an exception.
WebResponse.Dispose(bool explicitDisposing) was removed.
Deployment.PartProperty is now read only.
Deployment.EntryPointAssemblyProperty is now read only.
Deployment.EntryPointTypeProperty is now read only.
Deployment.RuntimeVersionProperty is now read only.
Deployment.ExternalCallersFromCrossDomainProperty is now read only.
Thumb.IsDragging is now read only.
Slider.IsFocused is now read only.
ButtonBase.IsFocused is now read only.
ButtonBase.IsMouseOver is now read only.
ButtonBase.IsPressed is now read only.
ToolTipService.GetToolTip is now private.
IRawElementProviderSimple is now sealed and has a private default constructor.
Setter.PropertyProperty is now internal. Please use the CLR property instead of the DependencyProperty.
Slider.UpdateTrackLayout() is now internal.
Slider.OnOrientationChanged() is now internal.
Slider.OnIsFocusChanged(DependencyPropertyChangedEventArgs e) is now internal.
ComboBox.get_IsSelectionActive() is now internal.
ComboBox.ScrollIntoView(Int32 index) is now internal.
ComboBox.get_SelectionBoxItemTemplate() now returns System.Windows.DataTemplate.
PasswordBox.SelectionChanged is now private.
MouseEventArgs.Handled was moved to MouseButtonEventArgs.
RenderTargetBitmap was renamed to HostingRenderTargetBitmap and moved from System.Windows.Media.Imaging to namespace System.Windows.Interop.
AutomationPeer constructor is now protected.
TriggerActionCollection.Item now takes System.Windows.TriggerAction instead of System.Windows.Media.Animation.BeginStoryboard.
TriggerCollection.Item now takes System.Windows.TriggerBase instead of System.Windows.EventTrigger.
RoutedEventArgs.Source was renamed to OriginalSource and is now read-only.
ITableItemProvider and ITableProvider are now derived from IGridItemProvider and IGridProvider.
The KeyboardNavigation class is now internal.
ColumnDefinitionCollection constructor was made internal.
InlineCollection constructor was made internal.
ItemCollection constructor was made internal.
RowDefinitionCollection constructor was made internal.
UIElementCollection constructor was made internal.
TriggerCollection constructor was made internal.
Listbox field ListBoxItem._itemsControl is now internal.
Ink.Stroke constructor changed to ctor(System.Windows.Input.StylusPointCollection).
CanConvertFrom(Type sourceType) changed its signature to CanConvertFrom(ITypeDescriptorContext context, Type sourceType).
CanConvertTo(Type destinationType) changed its signature to CanConvertTo(ITypeDescriptorContext context, Type destinationType).
ConvertFrom(object value) changed its signature to ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value).
ConvertFromString(string text) now is ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) where value of type string.
ConvertTo(object value, Type destinationType) changed its signature to ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType).
ConvertToString(object value) now is ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) with destinationType of type string.
ItemCollection constructor is no longer available so any code that tries to instantiate an ItemCollection directly will no longer compile. This class is supposed to be instantiated only within ItemsControl.
ContentPresenter now derives from FrameworkElement instead of Control.
Control.OnIsEnabledChanged was removed. Now use IsEnabledChanged for extended controls.
DownloadProgressEventHandler was removed.
The following converters were removed:
TextDecorationCollectionConverter
FontStretchConverter
FontStyleConverter
FontWeightConverter
FontFamilyConverter
c f
& ' ( , - . D E H ķ̳~zqga
hk 0JF j hk 0JF Uhc hc 0JZ hs h^# h^# 0JF hY hY 0Jq j hGq Uj hY Uh^# h^# h^# h^# 0J hgYt hgYt hgYt 0Jq hh j hh UhgYt hgYt hgYt hgYt 0J
hgu 0JF hF hF 0J@ hF hF 0JF hiX hY h1 "
E K
B 1 : / r H 5 - gdk ) gd^# ) gdgYt gdgu I J K L z { |
*
+
,
ĴʩʠԐwg j hk hGq UaJ j hk hGq UaJ hk hk 0JF j hk hGq UaJ hk hs 0JF hs hs 0Jq aJ j hs hs UaJ
hs 0JF j hs 0JF U
hk 0JF hk hk 0Jq aJ j hk 0JF Uju hk hGq UaJ # @ A B C r s t / 0 1 2 h i j 8 9 : ; \ ˻˫˛ˋ{ j hk hGq UaJ j^ hk hGq UaJ j hk hGq UaJ j hk hGq UaJ j hk hGq UaJ
hk 0JF hk hk 0JF hk hk 0Jq aJ j hk 0JF Uj hk hGq UaJ *\ ] ^ - . / 0 T U V p q r s F G H I p ˻˫˛ˋ{ j hk hGq UaJ jp hk hGq UaJ j hk hGq UaJ jv hk hGq UaJ j hk hGq UaJ
hk 0JF hk hk 0JF hk hk 0Jq aJ j hk 0JF Ujf hk hGq UaJ *p q r 3 4 5 6 e f g $ % & ' Q R S ˻˫˛ˋ{ jq hk hGq UaJ j hk hGq UaJ jQ hk hGq UaJ j
hk hGq UaJ j
hk hGq UaJ
hk 0JF hk hk 0JF hk hk 0Jq aJ j hk 0JF Uj hk hGq UaJ * & ; R [ \ * % -
&