Exemplo n.º 1
0
        protected override void Initialize()
        {
            base.Initialize();

            var adornerLayer = AdornerLayer.GetAdornerLayer(Adorner ?? AssociatedObject);

            if (adornerLayer == null)
            {
                Log.Error("Cannot find AdornerLayer. Use the Adorner property to specify a specific instance to use when searching for an adorner layer");
                return;
            }

            _adorneredTooltipsManager = _adorneredTooltipsManagerFactory.Create(adornerLayer);

            // TODO: Only enable on ALT key
            _adorneredTooltipsManager.Enable();
        }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            base.Initialize();

            var adornerLayer = AdornerLayer.GetAdornerLayer(Adorner ?? AssociatedObject);

            if (adornerLayer == null)
            {
                Log.Error("Cannot find AdornerLayer. Use the Adorner property to specify a specific instance to use when searching for an adorner layer");
                return;
            }

            if (KeyboardHelper.AreKeyboardModifiersPressed(System.Windows.Input.ModifierKeys.Alt))
            {
                var adorneredTooltipsManager = _adorneredTooltipsManagerFactory.Create(adornerLayer);
                adorneredTooltipsManager.Enable();
            }
        }