Ejemplo n.º 1
0
        // Capture the mouse event and hit test the coordinate point value against
        // the child visual objects.
        void MouseLeftButtonDownHandler(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            ToolTipController.Hide();

            // Retreive the coordinates of the mouse button event.
            Point         pt  = e.GetPosition(this);
            DrawingVisual hit = VisualTreeHelper.HitTest(this, pt).VisualHit as DrawingVisual;

            if (hit != null)
            {
                string tag = hit.ReadLocalValue(FrameworkElement.TagProperty) as string;
                if (tag != null)
                {
                    foreach (DrawingVisual v in _graph.Children)
                    {
                        v.BitmapEffect = null;
                    }

                    OuterGlowBitmapEffect glow = new OuterGlowBitmapEffect();
                    glow.GlowColor = Colors.Blue;
                    glow.GlowSize  = 1;
                    glow.Opacity   = 0.8;
                    glow.Freeze();
                    hit.BitmapEffect = glow;
                }
            }
        }
Ejemplo n.º 2
0
        public void SetGlowOnDrawingVisual(DrawingVisual visual, Color color)
        {
            OuterGlowBitmapEffect glow = new OuterGlowBitmapEffect();

            glow.GlowColor = color;
            glow.GlowSize  = 1;
            glow.Opacity   = 0.8;
            glow.Freeze();
            visual.BitmapEffect = glow;
        }
Ejemplo n.º 3
0
        static MFPlannerProjectControl()
        {
            dOk.Freeze();
            dWarn.Freeze();
            dError.Freeze();
            dStop.Freeze();
            dAvait.Freeze();

            //penRound.Freeze();
            penPercentage.Freeze();

            selectDataEffect.Freeze();
        }