실버라이트 2.0 RC0 버전이 나왔습니다. 정식 버전이 나오기에 앞서 개발자들에게 미리 대비할 수 있게 공개된 개발자 버전입니다.
정식 릴리즈가 되기 앞서 인사천리로 나와버렸네요... 많은 개발자들이 아마도 당황했으리라 여겨집니다.
변경된 사항에 대한 전문입니다. 그리고 아래 글에 대한 원문입니다.
http://silverlight.net/blogs/msnow/archive/2008/09/25/silverlight-version-2-rc0-release.aspx
이 글을 공도님이 발빠르게 한국어로 번역을 하였습니다. 다음링크를 참고하세요
http://gongdo.tistory.com/321
Version 2 of the Silverlight developer runtime along with the Silverlight Tools is now available. This release candidate will give developers the chance to convert their sites from Beta 2 –> Release before the final release of the runtime is out.
Please check out http://silverlight.net/GetStarted/sl2rc0.aspx for download details that include the developer runtime, Silverlight Tools and Blend.
Also, check out ScottGu’s great blog on this release:
http://weblogs.asp.net/scottgu/archive/2008/09/25/silverlight-2-release-candidate-now-available.aspx
A document detailing the breaking changes between Beta2 and Release can be downloaded here. Below I have outlined a high level overview of the content from this document. If you need further details on a particular breaking change, please refer to the document.
Breaking Change #1. Your Web Page.
If you have a project already developed for beta-1 or beta-2 you will need to make an adjustment to your web page that hosts the Silverlight control. For an HTML page change you will need to change the MIME type. To do this, open your HTML Page, change “x-silverlight-2-b1” or “application/x-silverlight-2-b2” to “application/x-silverlight-2”.
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
If you use an ASPX based Page, open your ASPX page and change the Minimum Version to “2.0.30923.0”:
<asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/TextBlockTest.xap" MinimumVersion="2.0.30923.0" Width="100%" Height="100%" />
Breaking Change #2. ContentPresenter.
ContentPresenter now derives from FrameworkElement instead of Control.
Breaking Change #3. Layout Rendering
Layout no longer causes elements to be rendered at sub-pixel locations. 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. It is possible that this change will affect how your animations render, in which case you might want to set UseLayoutRounding to false. Also, this change does not affect transforms. If you apply a transform to an element, it may still be rendered at a sub-pixel location.
Breaking Change #4. Cross Domain Hosts.
Cross domain hosts of Silverlight must set the right MIME type for XAP (application/x-silverlight-app)
Breaking Change #5. HttpWebRequest.EndGetResponse()
Exceptions now thrown in HttpWebRequest.EndGetResponse()
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.
Breaking Change #6. Font URI
Font URI is Restricted to Assembly Resource. Ensure your font is marked as a "resource" in the project system.
Breaking Change #7. Browser.HtmlElementCollection.
Browser.HtmlElementCollection replaced by Browser.ScriptObjectCollection. Change existing references to HtmlElementCollection to ScriptObjectCollection
Beta 2
HtmlElement myHtmlElement = someOtherHtmlElement.Children[5];Release
HtmlElement myHtmlElement = (HtmlElement)someOtherHtmlElement.Children[5];
Breaking Change #8. Active Animation
Exceptions When Changing Some Properties on an Active Animation
Breaking Change #9. System.Windows.Controls.Extended.dll
System.Windows.Controls.Extended.dll renamed to System.Windows.Controls.dll. Change all references from System.Controls.Extended to System.Windows.Controls and recompile your application.
Breaking Change #10. VisualStateManager Changes
VisualTransition.Duration has changed to VisualTransition.GeneratedDuration. This value will now only affect the generated transitions, and not the VisualTransition.Storyboard.
Breaking Change #11. KeyDown
KeyDown Sent Synchronously
Breaking Change #12. MeasureOverride/ArrangeOverride
MeasureOverride/ArrangeOverride on Canvas Now Sealed
Breaking Change #13. UriTypeConverter
UriTypeConverter moved to System.dll
Breaking Change #14. HtmlPage.UnregisterScriptableObject
HtmlPage.UnregisterScriptableObject Removed. 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.
Breaking Change #15. RenderingEventArgs
- RenderingEventArgs is moved from System.Windows to System.Windows.Media
- RenderingEventArgs.ctor() is now internal
- System.Windows.RenderingEventHandler has been removed.
Breaking Change #16. ContentPresenter and ContentControl.
The following properties were removed from ContentPresenter and ContentControl:
- TextAlignment
- TextDecorations
- TextWrapping
Breaking Change #17. FileDialogFileInfo Type and OpenFileDialog.SelectedFile
- 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 Silverlight’s 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.
Breaking Change #18. FullAccess Option
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.
Breaking Change #19. KeyFrameCollection Changes
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
Breaking Change #20. Request stream
You must close the request stream on an HttpWebRequest before calling BeginGetResponse(). Previously BeginGetResponse() would close an open request stream.
Breaking Change #21. HtmlWindow references on Safari/Mac
HtmlWindow references on Safari/Mac will no longer evaluate to true.
Breaking Change #22. WebClient EventArg
Address property removed from all WebClient EventArg classes
Breaking Change #23. Constructors Made Internal
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
Breaking Change #24. System.Xml exception type
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
Breaking Change #25. Accessible constructors
Cannot create classes in XAML that do not have accessible constructors
Breaking Change #26. AG_E_UNKNOWN_ERROR
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.
Breaking Change #27. Generic.xaml resource dictionary
Platform looks for generic.xaml as a resource at themes/generic.xaml
Breaking Change #28. HTTP Polling Duplex OM Changes and Reengineering
- 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 #29. IXcpControl COM interface
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
Breaking Change #30. Content-Type is allowed on cross domain request by default
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.
Breaking Change #31. Delegate type check
f you want to combine two delegate objects they should be of the exact same delegate type.
Breaking Change #32. 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
Thank you,
--Mike Snow
'.NET WPF' 카테고리의 다른 글
Silverlight 2 Controls Review - CheckBox, RadioButton (0) | 2008.09.30 |
---|---|
Silverlight 2 Controls Review - DatePicker, Calendar (0) | 2008.09.28 |
Silverlight 2.0 RC0 관련 필요 유틸리티 (0) | 2008.09.27 |
Silverlight 2 Controls Review- TextBox, Button, TextBlock (0) | 2008.09.27 |
Korea Silverlight Developer Site (0) | 2008.06.30 |
Silverlight Logo 멋지지 않나요? (0) | 2008.06.12 |
Silverlight 2.0 LoadMap (0) | 2008.06.05 |
댓글