您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 咨询培训 > 创建第一个WP7应用程序
BorderBackground=CoralCornerRadius=20BorderBrush=RedBorderThickness=5Width=300Height=100TextBlockFontSize=26TextWrapping=WrapHeight=70用Border为文本框添加背景及边框/TextBlock/Border手势含义描述Tap点击手指在特定的时间和距离间隔内落下和抬起DoubleTap双击特定时间和距离间隔内的两次连续TapPan平移手指按下并在屏幕上移动一定距离Flick滑动手指在屏幕上快速滑动一段距离TouchandHold长按手指在一定屏幕范围内按下并保持一定时间PinchandStrech缩放两个手指接触屏幕并彼此靠近或远离Manipulation事件Mouse事件描述ManipulationStartedMouseLeftButtonDown当用户将手指放在屏幕上开始操作时发生此事件ManipulationDeltaMouseMove当用户在屏幕上移动手指时重复发生此事件ManipulationCompletedMouseLeftButtonUp当用户从屏幕上移开手指时发生此事件publicMainPage(){InitializeComponent();this.ManipulationDelta+=this.PhoneApplicationPage_ManipulationDelta;}voidPhoneApplicationPage_ManipulationDelta(objectsender,ManipulationDeltaEventArgse){//缩放this.scale.ScaleX*=e.DeltaManipulation.Scale.X;this.scale.ScaleY*=e.DeltaManipulation.Scale.Y;//平移this.translation.X+=e.DeltaManipulation.Translation.X;this.translation.Y+=e.DeltaManipulation.Translation.Y;}//处理触摸事件1TouchCollectiontouchCollection=TouchPanel.GetState();foreach(TouchLocationtlintouchCollection){if((tl.State==TouchLocationState.Pressed)||(tl.State==TouchLocationState.Moved)){sparkles.Add(newSparkle(tl.Position.X,tl.Position.Y,ttms));}}//处理触摸事件2while(TouchPanel.IsGestureAvailable){GestureSamplegs=TouchPanel.ReadGesture();switch(gs.GestureType){caseGestureType.VerticalDrag:poem.offset.Y-=gs.Delta.Y;break;caseGestureType.Flick:poem.velocity.Y+=gs.Delta.Y;break;}}SilverlightforWindowsPhoneToolkitGridtoolkit:GestureService.GestureListenertoolkit:GestureListenerTap=OnTapHold=OnHoldDragStarted=OnDragStartedDragDelta=OnDragDeltaDragCompleted=OnDragCompletedFlick=OnFlickPinchStarted=OnPinchStartedPinchDelta=OnPinchDeltaPinchCompleted=OnPinchCompleted//toolkit:GestureService.GestureListener/Grid时间段变化到开始变化From/To动画From/By动画关键帧动画LinearInterpolationDoubleAnimationColorAnimationPositionAnimationStoryBoardKey-FrameAnimationDoubleAnimationUsingKeyFramesColorAnimationUsingKeyFramesPositionAnimationUsingKeyFramesobjectAnimationUsingKeyFramesStoryBoardColorAnimationDoubleAnimationPositionAnimationStoryBoardColorAnimationByKeyFramesDoubleAnimationByKeyFramesPositionAnimationByKeyFramesStoryBoard
本文标题:创建第一个WP7应用程序
链接地址:https://www.777doc.com/doc-6367435 .html