Example #1
0
        private void ExecuteCommand(object sender, ManipulationStartedEventArgs e)
        {
            ICommand cmd = (ICommand)((Image)sender).Tag;

            if (cmd != null)
                cmd.Execute(null);
        }
		void logout(object sender, ManipulationStartedEventArgs		args)
		{
		this.NavigationService.Navigate(new Uri("/HealthTips.xaml",
		UriKind.Relative));
		args.Complete();
		args.Handled = true;
		}
Example #3
0
        protected override void OnManipulationStarted(ManipulationStartedEventArgs args)
        {
            GetRandomPicture();

            args.Complete();
            base.OnManipulationStarted(args);
        }
Example #4
0
        protected override void OnManipulationStarted(ManipulationStartedEventArgs args)
        {
            txtblk.Foreground = originalBrush;

            args.Complete();
            base.OnManipulationStarted(args);
        }
Example #5
0
        void OnTextBlockManipulationStarted(object sender, ManipulationStartedEventArgs args)
        {
            this.NavigationService.GoBack();

            args.Complete();
            args.Handled = true;
        }
        private void CalendarButton_ManipulationStarted(object sender, ManipulationStartedEventArgs e)
        {
            SolidColorBrush brush = new SolidColorBrush();
            brush.Color = (Color) App.Current.Resources["CalendarBackDarkGray"];

            CalendarButton.Background = brush;
        }
Example #7
0
		void gotoEditProfile(object sender, ManipulationStartedEventArgs		args)
		{
		this.NavigationService.Navigate(new Uri("/EditProfile.xaml",
		UriKind.Relative));
		args.Complete();
		args.Handled = true;
		}
        void OnT6ManipulationStarted(object sender, ManipulationStartedEventArgs args)
        {
            this.NavigationService.Navigate(new Uri("/T6.xaml", UriKind.Relative));

            args.Complete();
            args.Handled = true;
        }
Example #9
0
        protected override void OnManipulationStarted(ManipulationStartedEventArgs args)
        {
            camera.Show();

            args.Complete();
            args.Handled = true;
            base.OnManipulationStarted(args);
        }
Example #10
0
 protected override void OnManipulationStarted(ManipulationStartedEventArgs args)
 {
     if (!DemoAutoSlide)
     {
         PumpDemoFrames(null, null);
     }
     base.OnManipulationStarted(args);
 }
Example #11
0
		void logout(object sender, ManipulationStartedEventArgs		args)
		{
        MessageBox.Show("Stay frosty");
		this.NavigationService.Navigate(new Uri("/MainPage.xaml",
		UriKind.Relative));
		args.Complete();
		args.Handled = true;
		}
Example #12
0
		void viewProfile(object sender, ManipulationStartedEventArgs	args)
		{
		this.NavigationService.Navigate(new Uri("/Profile.xaml",
		UriKind.Relative));
		args.Complete();
		args.Handled = true;
        MessageBox.Show("this ill wrk");
		}
        private void OnManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            var control = (FrameworkElement)sender;

            control.CaptureMouse();

            e.Handled = true;
        }
Example #14
0
        private void imgWarning_ManipulationStarted(
            object sender, ManipulationStartedEventArgs e)
        {
            e.Complete();
            e.Handled = true;

            MessageBox.Show(Properties.Resources.WarningStorePassword,
                (string)chkStore.Content, MessageBoxButton.OK);
        }
 private void MyPivot_ManipulationStarted(object sender, ManipulationStartedEventArgs e)
 {
     if (e.OriginalSource.GetType().Name == "Image")
     {
         MyPivot.IsLocked = true;
     }
     else
         MyPivot.IsLocked = false;
 }
 private void Page_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     // Hiding the overlay directly seems to skip its animation.
     // TODO: Look for a better alternative.
     if (_albumArtOverlayTimer != null)
     {
         _albumArtOverlayTimer.Interval = TimeSpan.FromSeconds(0);
     }
 }
Example #17
0
        protected override void OnManipulationStarted(ManipulationStartedEventArgs args)
        {
            ContentPanel.Background = new SolidColorBrush(
                Color.FromArgb(255, (byte)rand.Next(255),
                                    (byte)rand.Next(255),
                                    (byte)rand.Next(255)));

            base.OnManipulationStarted(args);
        }
Example #18
0
 protected override void OnManipulationStarted(ManipulationStartedEventArgs e) {
     if (e.OriginalSource is Image && isGameing) {
         Image img = e.OriginalSource as Image;
         this.MoveTileAndCheckGameOver(img);
         e.Complete();
         e.Handled = true;
     }
     base.OnManipulationStarted(e);
 }
Example #19
0
        protected override void OnManipulationStarted(ManipulationStartedEventArgs args)
        {
            Uri uri = new Uri("http://www.charlespetzold.com/Media/HelloWP7.jpg");
            BitmapImage bmp = new BitmapImage(uri);
            img.Source = bmp;

            args.Complete();
            args.Handled = true;
            base.OnManipulationStarted(args);
        }
Example #20
0
 void OnTextBlockManipulationStarted(object sender,
                                     ManipulationStartedEventArgs args)
 {
     txtblk.Foreground = new SolidColorBrush(
                 Color.FromArgb(255, (byte)rand.Next(256),
                                     (byte)rand.Next(256),
                                     (byte)rand.Next(256)));
     args.Complete();
     args.Handled = true;
 }
        /// <summary>
        /// Called when the <see cref="E:System.Windows.UIElement.ManipulationStarted" /> event occurs.
        /// </summary>
        /// <param name="e">The data for the event.</param>
        protected override void OnManipulationStarted(ManipulationStartedEventArgs e)
        {
            base.OnManipulationStarted(e);
            if (e.Handled)
            {
                return;
            }

            e.Handled = this.Controller.HandleTouchStarted(this, e.ToTouchEventArgs(this));
        }
Example #22
0
        // Commands can't be binded yet so have to use code behind
        private void ExecuteCommand(object sender, ManipulationStartedEventArgs e)
        {
            ICommand command = (ICommand)((StackPanel)sender).Tag;

            if (command != null)
            {
                command.Execute(null);
                Pages.SelectedIndex = 1;
            }
        }
Example #23
0
        protected override void OnManipulationStarted(ManipulationStartedEventArgs args)
        {
            WebClient webClient = new WebClient();
            webClient.OpenReadCompleted += OnWebClientOpenReadCompleted;
            webClient.OpenReadAsync(new Uri("http://www.charlespetzold.com/Media/HelloWP7.jpg"));

            args.Complete();
            args.Handled = true;
            base.OnManipulationStarted(args);
        }
Example #24
0
 //private void button1_Click(object sender, RoutedEventArgs e)
 //{
 //    border1.Visibility = Visibility.Collapsed;
 //}
 private void panoramaControl_ManipulationStarted(object sender, ManipulationStartedEventArgs e)
 {
     LicenseInformation lic = new LicenseInformation();
     if (lic.IsTrial())
     {
         if (panoramaControl.SelectedIndex >= 2)
         {
             NavigationService.Navigate(new Uri("/BuyFullversion.xaml", UriKind.RelativeOrAbsolute));
         }
     }
 }
Example #25
0
        void OnTextBlockManipulationStarted(object sender, ManipulationStartedEventArgs args)
        {
            if (ContentPanel.Background is SolidColorBrush)
                (Application.Current as App).SharedColor =
                                (ContentPanel.Background as SolidColorBrush).Color;

            this.NavigationService.GoBack();

            args.Complete();
            args.Handled = true;
        }
Example #26
0
        void OnTextBlockManipulationStarted(object sender, ManipulationStartedEventArgs args)
        {
            if (ContentPanel.Background is SolidColorBrush)
                (Application.Current as App).SharedColor =
                                (ContentPanel.Background as SolidColorBrush).Color;

            this.NavigationService.Navigate(new Uri("/SecondPage.xaml", UriKind.Relative));

            args.Complete();
            args.Handled = true;
        }
Example #27
0
        protected override void OnManipulationStarted(ManipulationStartedEventArgs args)
        {
            ContentPanel.Background =
                new SolidColorBrush(Color.FromArgb(255, (byte)rand.Next(256),
                                                        (byte)rand.Next(256),
                                                        (byte)rand.Next(256)));
            UpdatePageTitle(++numTaps);

            args.Complete();
            base.OnManipulationStarted(args);
        }
        protected override void OnManipulationStarted(ManipulationStartedEventArgs e)
        {
            base.OnManipulationStarted(e);

            //isTilting = true;

            width = this.ActualWidth;
            height = this.ActualHeight;

            this.TiltBackStoryboard.Stop();
            DepressAndTilt(e.ManipulationOrigin, e.ManipulationContainer);
        }
Example #29
0
        protected override void OnManipulationStarted(ManipulationStartedEventArgs args)
        {
            Uri uri = new Uri("/SilverlightTapToLoad;component/Images/Hello.png", UriKind.Relative);
            StreamResourceInfo resourceInfo = Application.GetResourceStream(uri);
            BitmapImage bmp = new BitmapImage();
            bmp.SetSource(resourceInfo.Stream);
            img.Source = bmp;

            args.Complete();
            args.Handled = true;
            base.OnManipulationStarted(args);
        }
 private void TextBlock_ManipulationStarted(object sender, ManipulationStartedEventArgs e)
 {
     var emailComposeTask = new EmailComposeTask {
         To = "*****@*****.**",
         Subject = "Kanji Flashcards",
         Body = ""
     };
     emailComposeTask.Show();
     
     e.Handled = true;
     e.Complete();
 }
Example #31
0
 private void OnManipulationStarted(object sender, ManipulationStartedEventArgs e)
 {
     if (e.ManipulationOrigin.X > 10)
     {
         return;
     }
     Dragging  = true;
     DragStart = e.ManipulationOrigin.X;
     IconBackground.RenderTransform = null;
     ExpandButton.RenderTransform   = null;
     PageSelector.RenderTransform   = null;
 }
Example #32
0
        void OnTextBlockManipulationStarted(object sender,
                                            ManipulationStartedEventArgs args)
        {
            TextBlock txtblk = sender as TextBlock;

            Color clr = Color.FromArgb(255, (byte)rand.Next(256),
                                            (byte)rand.Next(256),
                                            (byte)rand.Next(256));

            txtblk.Foreground = new SolidColorBrush(clr);

            args.Complete();
        }
Example #33
0
    void OnManipulationStarted(object sender, ManipulationStartedEventArgs e)
    {

      _repeatconn = Observable.Timer(TimeSpan.FromMilliseconds(700),
                                     TimeSpan.FromMilliseconds(100))
                                 .ObserveOnDispatcher()
                                 .Subscribe(
                                  val =>
                                  {
                                    if (_callback != null)
                                      _callback(false);
                                  }
                                 );
    }
 private void slider_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     timer.Stop();
 }
Example #35
0
        private void PostProcessInput(object sender, ProcessInputEventArgs e)
        {
            InputEventArgs inputEventArgs = e.StagingItem.Input;

            if (inputEventArgs.Device == this)
            {
                RoutedEvent routedEvent = inputEventArgs.RoutedEvent;
                if (routedEvent == Manipulation.ManipulationDeltaEvent)
                {
                    ManipulationDeltaEventArgs deltaEventArgs = inputEventArgs as ManipulationDeltaEventArgs;
                    if (deltaEventArgs != null)
                    {
                        // During deltas, see if panning feedback is needed on the window
                        ManipulationDelta unusedManipulation = deltaEventArgs.UnusedManipulation;
                        _manipulationLogic.RaiseBoundaryFeedback(unusedManipulation, deltaEventArgs.RequestedComplete);
                        _manipulationLogic.PushEventsToDevice();

                        // If a Complete is requested, then pass it along to the manipulation processor
                        if (deltaEventArgs.RequestedComplete)
                        {
                            _manipulationLogic.Complete(/* withInertia = */ deltaEventArgs.RequestedInertia);
                            _manipulationLogic.PushEventsToDevice();
                        }
                        else if (deltaEventArgs.RequestedCancel)
                        {
                            Debug.Assert(!deltaEventArgs.IsInertial);
                            OnManipulationCancel();
                        }
                    }
                }
                else if (routedEvent == Manipulation.ManipulationStartingEvent)
                {
                    ManipulationStartingEventArgs startingEventArgs = inputEventArgs as ManipulationStartingEventArgs;
                    if (startingEventArgs != null && startingEventArgs.RequestedCancel)
                    {
                        OnManipulationCancel();
                    }
                }
                else if (routedEvent == Manipulation.ManipulationStartedEvent)
                {
                    ManipulationStartedEventArgs startedEventArgs = inputEventArgs as ManipulationStartedEventArgs;
                    if (startedEventArgs != null)
                    {
                        if (startedEventArgs.RequestedComplete)
                        {
                            // If a Complete is requested, pass it along to the manipulation processor
                            _manipulationLogic.Complete(/* withInertia = */ false);
                            _manipulationLogic.PushEventsToDevice();
                        }
                        else if (startedEventArgs.RequestedCancel)
                        {
                            OnManipulationCancel();
                        }
                        else
                        {
                            // Start ticking to produce delta events
                            ResumeAllTicking(); // Resumes the ticking of all the suspended devices on the thread
                            StartTicking();     // Ensures that we continue ticking or restart ticking for this device
                        }
                    }
                }
                else if (routedEvent == Manipulation.ManipulationInertiaStartingEvent)
                {
                    // Switching from using rendering for ticking to a timer at lower priority (handled by ManipulationLogic)
                    StopTicking();

                    // Remove all the manipulators so that we dont re-start manipulations accidentally
                    RemoveAllManipulators();

                    // Initialize inertia
                    ManipulationInertiaStartingEventArgs inertiaEventArgs = inputEventArgs as ManipulationInertiaStartingEventArgs;
                    if (inertiaEventArgs != null)
                    {
                        if (inertiaEventArgs.RequestedCancel)
                        {
                            OnManipulationCancel();
                        }
                        else
                        {
                            _manipulationLogic.BeginInertia(inertiaEventArgs);
                        }
                    }
                }
                else if (routedEvent == Manipulation.ManipulationCompletedEvent)
                {
                    _manipulationLogic.OnCompleted();
                    ManipulationCompletedEventArgs completedEventArgs = inputEventArgs as ManipulationCompletedEventArgs;
                    if (completedEventArgs != null)
                    {
                        if (completedEventArgs.RequestedCancel)
                        {
                            Debug.Assert(!completedEventArgs.IsInertial);
                            OnManipulationCancel();
                        }
                        else if (!(completedEventArgs.IsInertial && _ticking))
                        {
                            // Remove the manipulation device only if
                            // another manipulation didnot start
                            OnManipulationComplete();
                        }
                    }
                }
                else if (routedEvent == Manipulation.ManipulationBoundaryFeedbackEvent)
                {
                    ManipulationBoundaryFeedbackEventArgs boundaryEventArgs = inputEventArgs as ManipulationBoundaryFeedbackEventArgs;
                    if (boundaryEventArgs != null)
                    {
                        _compensateForBoundaryFeedback = boundaryEventArgs.CompensateForBoundaryFeedback;
                    }
                }
            }
        }
Example #36
0
 private void canvas_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     _viewMoved      = false;
     initialPosition = Canvas.GetLeft(LayoutRoot);
 }
 // ManipulationStarted is the same thing as DragStarted.
 private void OnManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     Debug.WriteLine("OnManipulationStarted");
 }
Example #38
0
 private void DatePicker_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     dateTimeModifying = true;
 }