Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using built-in controls for great touch apps out- of-the-box.

Similar presentations


Presentation on theme: "Using built-in controls for great touch apps out- of-the-box."— Presentation transcript:

1

2

3

4 Using built-in controls for great touch apps out- of-the-box

5

6

7

8 Customizing panning and zooming

9

10 <ScrollViewer >... VerticalSnapPointsType="Mandatory" VerticalSnapPointsAlignment="Near"

11 <ScrollViewer > HorizontalScrollMode="Rails" VerticalScrollMode="Rails"

12 //Setting min/max zoom factor svContent.MinZoomFactor =.5f; svContent.MaxZoomFactor = 8; //Adding zoom snap-points svContent.ZoomSnapPoints.Add(.5f); svContent.ZoomSnapPoints.Add(1); svContent.ZoomSnapPoints.Add(4); svContent.ZoomSnapPoints.Add(8);

13 Using the touch API for advanced touch interaction

14

15 private void Holding(object sender, HoldingEventArgs e) { switch (e.HoldingState) { case HoldingState.Started: { //perform action }; case HoldingState.Canceled: { //undo action }; case HoldingState.Completed: { //commit action }; }

16

17

18

19

20 PointerDevice Pointer PointerPoint

21 <Image PointerPressed="PointerPressed" PointerReleased="PointerReleased" PointerMoved="PointerMoved" /> PointerCanceled="PointerReleased"

22 private void PointerMoved(object sender, PointerEventArgs e) { PointerPoint pt = e.GetCurrentPoint(LayoutRoot);... Line l = new Line() {... X2 = pt.Position.X, Y2 = pt.Position.Y, StrokeThickness = pt.Properties.Pressure, };... }

23

24 Recap

25

26

27

28

29

30

31


Download ppt "Using built-in controls for great touch apps out- of-the-box."

Similar presentations


Ads by Google