Exemplo n.º 1
0
 void control_ContactLeave(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
 {
     ((ScatterViewItem)sender).SetRelativeZIndex(RelativeScatterViewZIndex.Bottommost);
 }
        /// <summary>
        /// This handler is called when a Contact is first recognized.
        /// </summary>
        /// <param name="sender">the element raising the ContactDownEvent</param>
        /// <param name="args">information about this ContactDownEvent</param>
        private static void OnContactDown(object sender, ContactEventArgs args)
        {
            TimeSpan timeSinceLastContact = DateTime.Now.Subtract(lastContactAt);
            SurfaceWindow sourceWindow = sender as SurfaceWindow;

            // If we know it's a Contact, and not a finger or a tap
            if ((timeSinceLastContact > TimeSpan.FromSeconds(10))
                && !args.Contact.IsFingerRecognized && !args.Contact.IsTagRecognized)
            {
                Rect emptyRect = new Rect(0, 0, 0, 0);
                CaptureRawImageAsync(sourceWindow, emptyRect, null);
            }
        }