Example #1
0
        private void MainWindow_OnMouseMove(object sender, MouseEventArgs e)
        {
            // Retrieve the coordinate of the mouse position.
            Point pt = e.GetPosition((UIElement)sender);

            // Perform the hit test against a given portion of the visual object tree.
            HitTestResult result = VisualTreeHelper.HitTest(this, pt);

            if (result != null)
            {
                if (result.VisualHit.GetType() == typeof (TextBlock))
                {
                    propertyGrid.SelectedObject = result.VisualHit;
                }

                // Perform action on hit visual object.

            }
        }
Example #2
0
        private void ArrowUp_MouseEnter(object sender, MouseEventArgs mouseEventArgs)
        {
            _currentMenu = Math.Abs(_currentMenu - 1);

            var offset = VisualTreeHelper.GetOffset(MenuBorder);
            var top = offset.Y;

            var menuOffset = VisualTreeHelper.GetOffset(_menus[_currentMenu]);
            var topOffSet = menuOffset.Y;

            var animation = new DoubleAnimationUsingKeyFrames { Duration = new Duration(TimeSpan.FromSeconds(1)) };
            var easingFunction = new QuarticEase { EasingMode = EasingMode.EaseInOut };
            var startAnimation = new EasingDoubleKeyFrame(_startPoint, KeyTime.FromPercent(0));
            var endAnimation = new EasingDoubleKeyFrame(topOffSet - top, KeyTime.FromPercent(1.0), easingFunction);
            animation.KeyFrames.Add(startAnimation);
            animation.KeyFrames.Add(endAnimation);

            var trans = new TranslateTransform();
            MenuBorder.RenderTransform = trans;
            trans.BeginAnimation(TranslateTransform.YProperty, animation);

            _startPoint = topOffSet - top;
        }
        void NotificationStack_OnMouseMove(object Sender, MouseEventArgs E)
        {
            _lastMouseMoveTime = DateTime.Now;

            Show();
        }
Example #4
0
 private void StackPanel_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     StackPanel.Opacity = 1;
 }
 private void UserControl_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
 }
Example #6
0
 private void Button_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     AssociatedObject.Width = this.Width;
 }
 private void DualPayloadHelpButton_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     DualPayloadPopup.IsOpen = false;
 }
Example #8
0
        //public void SetLocked(bool locked)
        //{
        //    txtLink.IsReadOnly = locked;
        //    Locked = locked;
        //}

        //public void SetBackgroundColour(string backgroundColour)
        //{
        //    this.Background = StyleHelper.GetBrushFromHex(backgroundColour);
        //}

        //public void SetBorderColour(string borderColour)
        //{
        //    this.BorderBrush = StyleHelper.GetBrushFromHex(borderColour);
        //    this.BorderThickness = new System.Windows.Thickness(1);
        //}

        //public void SetCaption(string caption)
        //{

        //}

        //public void SetFont(string font)
        //{
        //    this.FontFamily = new System.Windows.Media.FontFamily(font);
        //}

        //public void SetFontSize(int fontSize)
        //{
        //    this.FontSize = FontSize;
        //}

        //public void SetForegroundColour(string contentColour)
        //{
        //    this.Foreground = StyleHelper.GetBrushFromHex(contentColour);
        //}

        //public void SetGotMouseFocusHandler(Action action)
        //{
        //    GotMouseFocusHandler = action;
        //    this.MouseEnter += GnosisTextFieldWPF_MouseEnter;
        //}

        private void GnosisTextFieldWPF_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
        {
            //GotMouseFocusHandler.Invoke();
            HasMouseFocus = true;
        }
Example #9
0
        private void IgnoredApps_MouseExit(object sender, MouseEventArgs e)
        {
            var highlighted = (ApplicationWithRemoveButton)IgnoredList.SelectedItem;

            if (highlighted != null)
            {
                highlighted.Remove_Button.Visibility = Visibility.Hidden;
                highlighted.Removed -= RemoveBlocked;

                ListBoxItem Item = sender as ListBoxItem;
                Item.IsSelected = false;

                e.Handled = false;

            }
        }
Example #10
0
        private void IgnoredApps_MouseEnter(object sender, MouseEventArgs e)
        {
            //TODO: Remove this when it works; replace it with block/ignore lists

            ListBoxItem Item = sender as ListBoxItem;
            Item.IsSelected = true;

            var highlighted = (ApplicationWithRemoveButton)IgnoredList.SelectedItem;
            highlighted.Remove_Button.Visibility = Visibility.Visible;
            highlighted.Removed += RemoveIgnored;

            e.Handled = false;
        }
 private void Popup_MouseLeave(object sender, MouseEventArgs e)
 {
     Notification.DontExpire = false;
     _info.Opacity = _originalOpacity;
 }
 private void Popup_MouseEnter(object sender, MouseEventArgs e)
 {
     Notification.DontExpire = true;
     _info.Opacity = 1.0;
 }
Example #13
0
        protected override void OnMouseLeave(MouseEventArgs e)
        {
            if (DisplayState == DisplayStates.Opened)
            {
                // When the user moves the mouse out of the window, the timer to hide the window
                // should be started.
                stayOpenTimer.Stop();
                stayOpenTimer.Start();
            }

            base.OnMouseEnter(e);
        }
Example #14
0
        protected override void OnMouseEnter(MouseEventArgs e)
        {
            if (DisplayState == DisplayStates.Opened)
            {
                // When the user mouses over and the window is already open, it should stay open.
                // Stop the timer that would have otherwise hidden it.
                stayOpenTimer.Stop();
            }
            else if ((DisplayState == DisplayStates.Hidden) ||
                     (DisplayState == DisplayStates.Hiding))
            {
                // When the user mouses over and the window is hidden or hiding, it should open.
                DisplayState = DisplayStates.Opening;
            }

            base.OnMouseEnter(e);
        }
Example #15
0
 void ContentPanel_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     _SHOW.Pause();
 }
Example #16
0
 private void Button_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     //_SHOW.Resume();
 }
 private void UserControl_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     _hovering = false;
     Update(true);
 }
Example #18
0
 private void ScrollViewer_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     LeasingChart.HightlightManager.UnHightlightAll();
 }
Example #19
0
 private void Anchor_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     Show();
 }
Example #20
0
 // Этот обработчик добавляется к событию элементов в списке (как только мышь попадёт на элемент списка)
 // Выводится описание параметра, на которого наведён курсор
 // Сами события добавляются к элементам в xaml коде через:
 // ItemContainerStyle - Style - EventSetter
 private void ListBox_AvailableParameters_Item_MouseEnter(object sender, MouseEventArgs e)
 {
     ListBoxItem lBI = sender as ListBoxItem;
     TextBlock_ParameterDescription.Text = (lBI.Content as MyDataRow).GetDataRow[
         "ParameterDescription" + Properties.Settings.Default.DescriptionsLanguage].ToString();
 }
Example #21
0
        private void _nativeControl_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
        {
            _widget.OnMouseLeaveAction?.Invoke(_widget);

            OnUpdate();
        }
Example #22
0
        private void QrButton_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
        {
            var btnSender = sender as ToggleButton;

            btnSender.Background = Application.Current.FindResource("QrLightLogo") as Brush;
        }
Example #23
0
        private void Border_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
        {
            Border border = sender as Border;

            DetachEffect(border);
        }
Example #24
0
 private void OnMouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     RootGrid.RenderTransform.BeginAnimation(TranslateTransform.XProperty, _slideInAnim);
     _bubbleTranslateTransform.BeginAnimation(TranslateTransform.XProperty, _bubbleSlideIn);
 }
Example #25
0
 private void Grid_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     this.IsMouseOverSplitViewButton = true;
 }
 private void Popup_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     //Popup.IsOpen = false;
 }
Example #27
0
 private void Grid_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     this.IsMouseOverSplitViewButton = false;
 }
Example #28
0
 static void toast_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     ((ToastView)sender).Model.Inactive = false;
 }
Example #29
0
 private void Dg_Textbook_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
 {
     dg_Textbook.ToolTip = "Double-click a list item to edit the object";
 }
Example #30
0
 void ContentPanel_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     _SHOW.Resume();
 }
 private void UserControl_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     (FindResource("StoryboardNormal") as Storyboard)?.Begin();
 }
Example #32
0
 private void Button_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     //_SHOW.Pause();
 }
Example #33
0
 private void BtnExportVpr_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     BtnExportVpr.Opacity         = 0.1;
     BtnExportVprCover.Visibility = Visibility.Visible;
 }
Example #34
0
        private void OpenSettings_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
        {
            var uriSource = new Uri(@"/Resources/tools.png", UriKind.Relative);

            OpenSettings.Content = new System.Windows.Media.Imaging.BitmapImage(uriSource);
        }
Example #35
0
 private void BtnExportCcsCover_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     BtnExportCcs.Opacity         = 1;
     BtnExportCcsCover.Visibility = Visibility.Hidden;
 }
Example #36
0
        //public void SetHorizontalContentAlignment(GnosisController.HorizontalAlignmentType horizontalAlignment)
        //{
        //    this.SetHorizontalContentAlignmentExt(horizontalAlignment);

        //}

        //public void SetIsEnabled(bool isEnabled)
        //{
        //    this.IsEnabled = IsEnabled;
        //}

        //public void SetLostMouseFocusHandler(Action action)
        //{
        //    LostMouseFocusHandler = action;
        //    this.MouseLeave += GnosisTextFieldWPF_MouseLeave;
        //}

        private void GnosisTextFieldWPF_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
        {
            //LostMouseFocusHandler.Invoke();
            HasMouseFocus = false;
        }
Example #37
0
 private void Window_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     LogIn.Visibility  = Settings.Password.Equals("") ? Visibility.Visible : Visibility.Collapsed;
     LogOut.Visibility = !Settings.Password.Equals("") ? Visibility.Visible : Visibility.Collapsed;
 }
 void IMouseProcessor.PreprocessMouseMove(MouseEventArgs e)
 {
     foreach (var controller in GetControllersForView(TextView))
     {
         IMouseProcessor customProcessor = controller.CustomMouseProcessor;
         if (customProcessor != null)
             customProcessor.PreprocessMouseMove(e);
     }
 }
 /// <summary>
 /// Handles the MouseMove event of the cbTestPlansSource control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Windows.Input.MouseEventArgs"/> instance containing the event data.</param>
 private void cbTestPlansSource_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
 {
     ComboBoxDropdownExtensions.cboMouseMove(sender, e);
 }
 private void PreRCMDelayHelpButton_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     PreRCMDelayPopup.IsOpen = false;
 }
 public void ShowContextMenu(MouseEventArgs e)
 {
     CommandRouter.DisplayContextMenu(InheritanceMarginConstants.guidInheritanceMarginCommandSet, InheritanceMarginConstants.menuInheritanceTargets, _marginGlyph);
 }