Silverlight and NUI
-
Upload
andrej-tozon -
Category
Technology
-
view
2.467 -
download
3
description
Transcript of Silverlight and NUI
![Page 1: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/1.jpg)
SILVERLIGHT IN NUI
Andrej Tozon (ANT Andrej Tozon s.p.)
![Page 2: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/2.jpg)
SILVERLIGHT IN NUI
Andrej Tozon (ANT Andrej Tozon s.p.)
![Page 3: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/3.jpg)
PRI 14 MESECIH
![Page 4: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/4.jpg)
PRI ~2 LETIH
![Page 5: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/5.jpg)
PRI ~2,5 LETIH
![Page 6: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/6.jpg)
PRI ~2,5 LETIHPRI ~2 LETIHPRI 14 MESECIH
Telefon Tablica Miška0
5
10
15
20
25
30
![Page 7: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/7.jpg)
CAMDOODLE
SILVERLIGHTINNUI
![Page 9: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/9.jpg)
SILVERLIGHT IN NUI
• Touch• Multi-Touch
• Zelo low-level• Knjižnice
• Microsoft Surface Silverlight Manipulations and Interia
• Full-Screen Keyboard• Silverlight 4 – omejeno• Silverlight 5 – poln nabor
• WebCam• Kinect?
![Page 10: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/10.jpg)
SILVERLIGHT: MULTITOUCH
• Podpora je prišla s Silverlight 3
Touch.FrameReported += OnFrameReported;
![Page 11: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/11.jpg)
SILVERLIGHT: MULTITOUCH
private void OnFrameReported(object sender, TouchFrameEventArgs e) {}
public class TouchFrameEventArgs{ TouchPoint GetPrimaryTouchPoint(UIElement relativeTo); TouchPointCollection GetTouchPoints(UIElement relativeTo); void SuspendMousePromotionUntilTouchUp(); int Timestamp { get; }}
![Page 12: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/12.jpg)
SILVERLIGHT: MULTITOUCH
public class TouchPoint{ public TouchAction Action { get; } public Point Position { get; } public Size Size { get; } public TouchDevice TouchDevice { get; }}
public enum TouchAction{ Down, Move, Up}
public class TouchDevice{ public int Id { get; } public UIElement DirectlyOver { get; }}
![Page 13: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/13.jpg)
DEMO
Microsoft Surface Silverlight Manipulations and Inertia
Multitouch Behaviors
![Page 14: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/14.jpg)
SILVERLIGHT: WEBCAM
public static class CaptureDeviceConfiguration{ static bool AllowedDeviceAccess { get; } static bool RequestDeviceAccess(); static ReadOnlyCollection<VideoCaptureDevice> GetAvailableVideoCaptureDevices(); static ReadOnlyCollection<AudioCaptureDevice> GetAvailableAudioCaptureDevices(); static VideoCaptureDevice GetDefaultVideoCaptureDevice(); static AudioCaptureDevice GetDefaultAudioCaptureDevice();}
![Page 15: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/15.jpg)
SILVERLIGHT: WEBCAM
public class CaptureSource{ VideoCaptureDevice VideoCaptureDevice { get; set; } AudioCaptureDevice AudioCaptureDevice { get; set; } CaptureState State { get; } void Start(); void Stop(); event EventHandler<ExceptionRoutedEventArgs> CaptureFailed; void CaptureImageAsync(); event EventHandler<CaptureImageCompletedEventArgs> CaptureImageCompleted;}
VideoBrush brush = new VideoBrush();brush.SetSource(captureSource);Rectangle.Fill = brush;
![Page 16: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/16.jpg)
SILVERLIGHT: WEBCAM
CompositionTarget.Rendering += CompositionTarget_Rendering;
void CompositionTarget_Rendering(object sender, EventArgs e){ captureSource.CaptureImageAsync();}
void OnCaptureImageCompleted(object sender, CaptureImageCompletedEventArgs e){ ImageBrush brush = new ImageBrush(); brush.ImageSource = e.Result; rectangle.Fill = brush;}
![Page 17: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/17.jpg)
DEMO
Bug Smash
SLAR Toolkit
![Page 18: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/18.jpg)
POVZETEK
• Naravni uporabniški vmesniki• Silverlight omogoča:
• Podporo (multi) touch aplikacijam• Dostop do video kamere• Dostop do mikrofona
• Za lažjo uporabo posežemo po že izdelanih knjižnicah
• Medtem pa čakamo na podporo za Kinect
![Page 19: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/19.jpg)
POVEZAVE
• Microsoft Surface Manipulations and Inertia Sample for Microsoft Silverlight• http://to3.si/jO8ktN
• 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/
![Page 20: Silverlight and NUI](https://reader033.fdocuments.net/reader033/viewer/2022052311/5566000cd8b42a2a4d8b4dea/html5/thumbnails/20.jpg)
VPRAŠANJA?Po zaključku predavanja prosim izpolnite vprašalnik.
Vprašalniki bodo poslani na vaš e-naslov, dostopni pa bodo tudi preko profila na spletnem portalu konference. www.ntk.si.
Z izpolnjevanjem le tega pripomorete k izboljšanju konference.
Hvala!
Andrej TozonANT Andrej Tozon s.p.Microsoft MVP: Silverlight
[email protected]@andrejt
http://tozon.info/blog