Silverlight and NUI

2,654 views

Published on

My Silverlight and NUI talk from the recent NT konference in Portorož, Slovenia. In Slovenian language. References:
* Camdoodle (http://camdoodle.codeplex.com/)
* PuzzleTouch (http://www.puzzletouch.com/)
* Silverlight 4, WPF 4 and Windows Phone 7 Multi-Touch Manipulation (http://multitouch.codeplex.com/)
* Bug Smash (http://adamkinney.com/labs/bugcamsmash/)
* SLAR Toolkit (http://slartoolkit.codeplex.com/)

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,654
On SlideShare
0
From Embeds
0
Number of Embeds
1,839
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Silverlight and NUI

  1. 1. SILVERLIGHT IN NUI<br />Andrej Tozon (ANT Andrej Tozon s.p.) <br />
  2. 2. SILVERLIGHT IN NUI<br />Andrej Tozon (ANT Andrej Tozon s.p.)<br />
  3. 3. PRI 14 MESECIH<br />
  4. 4. PRI ~2 LETIH<br />
  5. 5. PRI ~2,5 LETIH<br />
  6. 6. PRI 14 MESECIH<br />PRI ~2 LETIH<br />PRI ~2,5 LETIH<br />
  7. 7. CAMDOODLE<br />SILVERLIGHT<br />in<br />NUI<br />
  8. 8. PUZZLETOUCH<br />
  9. 9. SILVERLIGHT IN NUI<br />Touch<br />Multi-Touch<br />Zelo low-level<br />Knjižnice<br />Microsoft Surface Silverlight Manipulations and Interia<br />Full-ScreenKeyboard<br />Silverlight 4 – omejeno<br />Silverlight 5 – poln nabor<br />WebCam<br />Kinect?<br />
  10. 10. SILVERLIGHT: MULTITOUCH<br />Podpora je prišla s Silverlight 3<br />Touch.FrameReported += OnFrameReported; <br />
  11. 11. SILVERLIGHT: MULTITOUCH<br />private void OnFrameReported(object sender,<br /> TouchFrameEventArgs e) <br />{<br />}<br />public class TouchFrameEventArgs<br />{<br />TouchPoint GetPrimaryTouchPoint(UIElement relativeTo);<br />  TouchPointCollection GetTouchPoints(UIElement relativeTo);<br />void SuspendMousePromotionUntilTouchUp();<br />int Timestamp { get; }<br />}<br />
  12. 12. SILVERLIGHT: MULTITOUCH<br />public class TouchPoint<br />{<br />   public TouchAction Action { get; }<br />public Point Position { get; }<br />   public Size Size { get; }<br />public TouchDevice TouchDevice { get; }<br />}<br />public enum TouchAction<br />{<br />Down, Move, Up<br />}<br />public class TouchDevice<br />{<br />public int Id { get; }<br /> public UIElement DirectlyOver { get; }<br />}<br />
  13. 13. DEMO<br />Microsoft Surface Silverlight Manipulations and Inertia<br />Multitouch Behaviors<br />
  14. 14. SILVERLIGHT: WEBCAM<br />public static class CaptureDeviceConfiguration<br />{<br />static bool AllowedDeviceAccess { get; }<br />    static bool RequestDeviceAccess();<br />    static ReadOnlyCollection<VideoCaptureDevice> <br />GetAvailableVideoCaptureDevices();<br />    static ReadOnlyCollection<AudioCaptureDevice> <br />GetAvailableAudioCaptureDevices();<br />    static VideoCaptureDevice GetDefaultVideoCaptureDevice();<br />    static AudioCaptureDevice GetDefaultAudioCaptureDevice();<br />} <br />
  15. 15. SILVERLIGHT: WEBCAM<br />public class CaptureSource<br />{<br />VideoCaptureDevice VideoCaptureDevice { get; set; }<br />    AudioCaptureDevice AudioCaptureDevice { get; set; }<br />    CaptureState State { get; }<br />    void Start();<br />    void Stop();<br />    event EventHandler<ExceptionRoutedEventArgs> <br />CaptureFailed;<br />    void CaptureImageAsync();<br />    event EventHandler<CaptureImageCompletedEventArgs> <br />CaptureImageCompleted;<br />}<br />VideoBrush brush = new VideoBrush();<br />brush.SetSource(captureSource);<br />Rectangle.Fill = brush;<br />
  16. 16. SILVERLIGHT: WEBCAM<br />CompositionTarget.Rendering += CompositionTarget_Rendering;<br />voidCompositionTarget_Rendering(objectsender, EventArgs e)<br />{<br />    captureSource.CaptureImageAsync();<br />}<br />void OnCaptureImageCompleted(object sender, <br />CaptureImageCompletedEventArgs e)<br />{<br />ImageBrush brush = new ImageBrush();<br /> brush.ImageSource = e.Result;<br />    rectangle.Fill = brush;<br />}<br />
  17. 17. DEMO<br />Bug Smash<br />SLAR Toolkit<br />
  18. 18. POVZETEK<br />Naravniuporabniški vmesniki<br />Silverlight omogoča:<br />Podporo (multi) touch aplikacijam<br />Dostop do video kamere<br />Dostop do mikrofona<br />Za lažjo uporabo posežemo po že izdelanih knjižnicah<br />Medtem pa čakamo na podporo za Kinect<br />
  19. 19. Povezave<br />Microsoft Surface Manipulations and Inertia Sample for Microsoft Silverlight<br />http://to3.si/jO8ktN<br />Silverlight 4, WPF 4 and Windows Phone 7 Multi-Touch Manipulation<br />http://multitouch.codeplex.com/<br />Bug Smash<br />http://adamkinney.com/labs/bugcamsmash/<br />SLAR Toolkit<br />http://slartoolkit.codeplex.com/<br />
  20. 20. andrej@tozon.info<br />@andrejt<br />http://tozon.info/blog<br />Andrej Tozon<br />ANT Andrej Tozon s.p.<br />Microsoft MVP: Silverlight<br />VPRAŠANJA?<br />Po zaključku predavanja prosim izpolnite vprašalnik.<br />Vprašalniki bodo poslani na vaš e-naslov, dostopni pa bodo tudi preko profila na spletnem portalu konference. www.ntk.si.<br />Z izpolnjevanjem le tega pripomorete k izboljšanju konference. <br />Hvala!<br />

×