 Jeff Prosise Cofounder, Wintellect www.wintellect.com

  • View
    216

  • Download
    4

Embed Size (px)

Transcript

  • Slide 1
  • Jeff Prosise Cofounder, Wintellect www.wintellect.com
  • Slide 2
  • Slide 3
  • Slide 4
  • Web UISilverlight UX
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • mscorlib System System.- Windows System.- Windows System.- Windows.- Browser System.- Windows.- Browser System.- Xml System.- Xml System.- Core System.- Core System.Windows System.Windows.Controls System.Windows.Input System.Windows.Interop System.Windows,Markup System.Windows.Media System.Windows.Resources System.Windows.Shapes System.Windows.Threading System.Windows.Browser System System.Collections System.Collections.Generic System.Collections.ObjectModel System.Diagnostics System.Globalization System.IO System.IO.IsolatedStorage System.Reflection System.Reflection.Emit System.Runtime.Serialization System.Runtime.Versioning System.Security System.Security.Cryptography System.Security.Principal System.Text System.Threading System System.CodeDom.Compiler System.Collections.Generic System.ComponentModel System.Diagnostics System.Text.RegularExpressions System.Linq System.Linq.Expressions System.Runtime.CompilerServices System.Security.Cryptography System.Xml System.XmlSchema System.Xml.Serialization System.- Net System.- Net System.Net System.Net.Sockets
  • Slide 11
  • Slide 12
  • http://blogs.msdn.com/shawnfa/archive/2007/05/09/the-silverlight-security-model.aspx
  • Slide 13
  • Application SecurityTransparent Silverlight SecuritySafeCritical SecurityCritical Operating System All user code is untrusted and can only call into other ST code or SSC SSC layer provides gateway to SC code SC layer P/Invokes into underlying OS
  • Slide 14
  • Slide 15
  • ...... Canvas TextBlock Other Objects Web page Silverlight control XAML objects
  • Slide 16 "> "> " title="">
  • Slide 17
  • YellowRect.Fill = new SolidColorBrush(Colors.Red);
  • Slide 18
  • Slide 19
  • Slide 20
  • private void OnMouseLeftButtonDown(Object sender, MouseButtonEventArgs e) { double x = e.GetPosition(null).X); // X-coordinate double y = e.GetPosition(null).Y); // Y-coordinate }
  • Slide 21 // C# private void OnClick(Object sender, MouseButtonEventArgs e) { ((Rectangle)sender).Fill = new SolidColorBrush(Colors.Red); }">
  • // XAML // C# private void OnClick(Object sender, MouseButtonEventArgs e) { ((Rectangle)sender).Fill = new SolidColorBrush(Colors.Red); }
  • Slide 22
  • private void OnMouseLeftButtonDown(Object sender, MouseButtonEventArgs e) { e.Handled = true; // Don't bubble any higher... }
  • Slide 23
  • private void OnMouseLeftButtonDown(Object sender, MouseButtonEventArgs e) { if ((Keyboard.Modifiers & ModifierKeys.Shift) != 0) { // Only act if Shift key is pressed }
  • Slide 24
  • Slide 25
  • Slide 26 (40,40) (0,0) (40,300) (80,80) (80,340)">
  • (40,40) (0,0) (40,300) (80,80) (80,340)
  • Slide 27
  • Orientation="Horizontal"Orientation="Vertical"
  • Slide 28
  • RectangleEllipsePolygon LinePolyLinePath
  • Slide 29 "> "> " title="">
  • Slide 30 "> "> " title="">
  • Slide 31 ">
  • Slide 32 "> "> " title="">
  • Slide 33 "> "> " title="">
  • Slide 34 ">
  • Slide 35 Silverlight"> Silverlight"> Silverlight" title=" Silverlight">
  • Silverlight
  • Slide 36 This is plain text This is bold text This is italicized text"> This is plain text This is bold text This is italicized text"> This is plain text This is bold text This is italicized text" title=" This is plain text This is bold text This is italicized text">
  • This is plain text This is bold text This is italicized text
  • Slide 37
  • Slide 38
  • Silverlight
  • Slide 39 NoneFill UniformUniformToFill Aspect ratio preservedAspect ratio not preserve"> NoneFill UniformUniformToFill Aspect ratio preservedAspect ratio not preserved"> NoneFill UniformUniformToFill Aspect ratio preservedAspect ratio not preserve" title=" NoneFill UniformUniformToFill Aspect ratio preservedAspect ratio not preserve">
  • NoneFill UniformUniformToFill Aspect ratio preservedAspect ratio not preserved
  • Slide 40
  • Slide 41 // C# // Start the video StartButton.Vi"> // C# // Start the video StartButton.Visible = Visibility.Collapsed; Player.Play(); private void OnMediaEnded(Object sender, RoutedEventArgs e) { StartButton.Visible = Visibility.Visible; Player.Position = new TimeSpan(0); // Reset to beginning }"> // C# // Start the video StartButton.Vi" title="// XAML // C# // Start the video StartButton.Vi">
  • // XAML // C# // Start the video StartButton.Visible = Visibility.Collapsed; Player.Play(); private void OnMediaEnded(Object sender, RoutedEventArgs e) { StartButton.Visible = Visibility.Visible; Player.Position = new TimeSpan(0); // Reset to beginning }
  • Slide 42
  • http://msdn.microsoft.com/en-us/library/cc189080(VS.95).aspx
  • Slide 43
  • Slide 44
  • Slide 45
  • Slide 46
  • Slide 47
  • Slide 48 "> "> " title="">
  • Slide 49
  • Slide 50 "> "> " title="">
  • Slide 51 "> " title=" ">
  • Slide 53
  • Slide 54
  • TranslateTransformRotateTransform SkewTransformScaleTransform
  • Slide 55 ..."> ..."> ..." title="...">
  • ...
  • Slide 56
  • Slide 57
  • Slide 58
  • Slide 59 Rectangle's Canvas.Left "> Rectangle's Canvas.Left property varies linearly from 0 to 200 over 2 seconds"> Rectangle's Canvas.Left " title=" Rectangle's Canvas.Left ">
  • Rectangle's Canvas.Left property varies linearly from 0 to 200 over 2 seconds
  • Slide 60 Canvas.Left goes from 0 to 50 "> Canvas.Left goes from 0 to 50 in first second Canvas.Left goes from 50 to 200 in second second"> Canvas.Left goes from 0 to 50 " title=" Canvas.Left goes from 0 to 50 ">
  • Canvas.Left goes from 0 to 50 in first second Canvas.Left goes from 50 to 200 in second second
  • Slide 61 "> "> " title="">
  • Slide 62 // C# private vo"> // C# private void OnClick(Object sender, MouseEventArgs e) { RectStoryBoard.Begin(); // Call Begin on Storyboard object }"> // C# private vo" title="// XAML // C# private vo">
  • // XAML // C# private void OnClick(Object sender, MouseEventArgs e) { RectStoryBoard.Begin(); // Call Begin on Storyboard object }
  • Slide 63
  • Slide 64
  • Slide 65
  • XamlReader.Load Creates object(s) from XAML strings One object or tree of objects Direct instantiation Ellipse e = new Ellipse(); One object at a time Add object(s) to DOM separately
  • Slide 66
  • Ellipse ellipse = new Ellipse(); ellipse.SetValue(Canvas.LeftProperty, 50.0); ellipse.SetValue(Canvas.TopProperty, 50.0); ellipse.Width = 100.0; ellipse.Height = 100.0; ellipse.Fill = new SolidColorBrush(Colors.Red); Placeholder.Children.Add(ellipse);
  • Slide 67
  • Slide 68 "; FrameworkElement ellipse = (FrameworkElement) XamlReader.Load(xaml); Placeholder.Children.Add(ellipse);">
  • string xaml = " // C# private void Button_Click(object sender, RoutedEventArgs e) {... }"> // C# private void Button_Click(object sender, Route" title="// XAML // C# private void Button_Click(object sender, Route">
  • // XAML // C# private void Button_Click(object sender, RoutedEventArgs e) {... }
  • Slide 73 "> "> " title="">
  • Slide 74
  • Slide 75 "> "> " title="">
  • Slide 76
  • Slide 77 // C# private void Calendar_SelectedDatesChanged(object sender, SelectionChangedEventArgs e) { HtmlPage.Window.Alert(Cal.SelectedDate.ToString()); }">
  • // XAML xmlns:swc="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" // C# private void Calendar_SelectedDatesChanged(object sender, SelectionChangedEventArgs e) { HtmlPage.Window.Alert(Cal.SelectedDate.ToString()); }
  • Slide 78
  • Slide 79 "> "> " title="">
  • Slide 80
  • Slide 81
  • ProgressBar with Value="20" ProgressBar with IsIndeterminate="True"
  • Slide 82
  • Slide 83 "> "> " title="">
  • Slide 84
  • Slide 85 "> "> " title=" ">
  • Slide 86 ..."> ..."> ..." title="...">
  • ...
  • Slide 87
  • // XAML... // C# private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { // Display t