140 likes | 313 Views
What’s new in Silverlight 4. Michael Sync (Silverlight MVP). Main Features. File Drag and Drop from Desktop Printing RichTextArea control Webcam and microphone access Validation with IDataErrorInfo. File Drag and Drop. Allows you to drag files from desktop to Silverlight Page
E N D
What’s new inSilverlight 4 Michael Sync (Silverlight MVP)
Main Features • File Drag and Drop from Desktop • Printing • RichTextArea control • Webcam and microphone access • Validation with IDataErrorInfo
File Drag and Drop • Allows you to drag files from desktop to Silverlight Page • AllowDrag = True • Listen the Drop event • Limitations • Windowless mode is not supported in Win • Need to use Javascript in Mac • Full Screen Mode is not supported
Demo Jeff Prosise's Silverlight 4 Drag and Drop Support
Printing Support • PrintDocument and DocumentName • Events • StartPrint • PrintPage (PageVisual) • EndPrint (PrintError) • HasMorePages • Print() • must be user-initiated • Limitations • Performance
Rich Text Area (Demo) John Papa’s Rich Text Area
Limitation of RichTextArea • TextDecorations.Strikethrough • Superscript and Subscript • TextAlignment.Justify • TextElement.BackgroundProperty • EditingCommands (esp: ToggleNumbering, ToggleBullets, DecreaseIndentation and IncreaseIndentation) • Hyperlink is unclickable when RTA is not in read-only mode
Validation • IDataErrorInfo
Out-Of-Browser (elevated permissions) • WebBrowsercontrol • Notification • Direct access to User folder (Full-Trust) • COM Interoperability (Full-Trust) • Clipboard direct access (Full-Trust) • Relaxed cross domain restriction
WebBrowsercontrol • Navigate(Uri) and NavigateToString(string) • SL => JS ( Source + InvokeScript ) • JS => SL (ScriptNotify + window.external) • HTML Brush
NotificationWindowAPI (Code) // create the nofitication window API NotificationWindownotify = new NotificationWindow(); notify.Height = 74; notify.Width = 329; // creating the content to be in the window CustomNotification custom = new CustomNotification(); custom.Header = "Sample Header"; custom.Text = "Hey this is a better looking notification!"; custom.Width = notify.Width; custom.Height = notify.Height; // set the window content notify.Content = custom; // displaying the notification notify.Show(4000);
Other Features • MEF • Implicit theming • Right-click event handling • Mouse wheel support • Cross-Browser Clipboard • ICommand support on ButtonBase and Hyperlink • TextTrimming • StringFormat, TargetNullValue, FallbackValue • Full keyboard access in full screen • Offline DRM for media playback • H.264 protected content via PlayReady • Google Chrome