Vineet Sarda Senior Consultant Microsoft Corporation SESSION CODE: WCL302
Navigating and Consuming the Web Playing Casual Games Reading and Sorting Viewing Photos Navigating Files and Using Applications Consuming Music and Video Key Touch Scenarios Are Consumptive
case WM_GESTURENOTIFY: { BOOL bResult; GESTURECONFIG gcAll[] = {0,GC_ALLGESTURES,0}; // Enable all gestures bResult = SetGestureConfig(hWnd, 0, 1, gcAll, sizeof(GESTURECONFIG)); } case WM_GESTURE: { GESTUREINFO gi; gi.cbSize = sizeof(gi); bResult = GetGestureInfo((HGESTUREINFO)lParam, &gi); switch (gi.dwID) { case GID_BEGIN: break; case GID_END: break; case GID_ZOOM: //GID_PAN, GID_ROTATE, GID_TWOFINGERTAP, GID_PRESSANDTAP break; }
.NET 3.5 Multitouch library Native Windows SDK.NET 4 WPF Silverlight Silverlight3 Gestures Available via manipulation Raw Touch Manipulation Inertia
StartingStartedDelta Inertia Starting DeltaCompleted StartInertia() Touch Down (Initial) Touch Move Touch Up (All) Initialize: Mode Container Pivot Completed()
void image_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { e.ManipulationContainer = canvas; } void image_ManipulationDelta(object sender, ManipulationDeltaEventArgs e) { var element = e.Source as FrameworkElement; if ( element != null ) { var deltaManipulation = e.DeltaManipulation; var matrix = ((MatrixTransform)element.RenderTransform).Matrix; Point center = new Point ( element.ActualWidth/2, element.ActualHeight/2) ; center = matrix.Transform(center); matrix.ScaleAt(deltaManipulation.Scale.X, deltaManipulation.Scale.Y, center.X, center.Y); matrix.RotateAt(e.DeltaManipulation.Rotation, center.X, center.Y); matrix.Translate(e.DeltaManipulation.Translation.X, e.DeltaManipulation.Translation.Y); ((MatrixTransform)element.RenderTransform).Matrix = matrix; }
Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub.
Sign up for Tech·Ed 2011 and save $500 starting June 8 – June 31 st You can also register at the North America 2011 kiosk located at registration Join us in Atlanta next year