Exemplo n.º 1
0
        private void Show(IntPtr owner)
        {
            if (InputManager.Current.IsInMenuMode)
            {
                return;
            }

            if (_hintWindow != null)
            {
                throw new NotSupportedException("Hint already shown");
            }

            // subclass
            _hintSource           = new HintSource();
            _hintSource.Activate += Close;
            _hintSource.SubClass(owner);

            // create hint window
            var ht = HintRoot.Create(PlacementRect, _hintSource);

            _hintWindow = new HintWindow(this, ht)
            {
                Text = _text
            };
            _hintSource.HintWindow = _hintWindow;
            //new WindowInteropHelper(_hintWindow) { Owner = _hintSource.Owner };
            _hintWindow.Closed   += HintWindowClosed;
            _hintWindow.MaxHeight = 1200.0;            //System.Windows.Forms.Screen.FromRectangle(PlacementRect).WorkingArea.
            _wrapWidth            = 1200.0;

            _hintWindow.WrapWidth = _wrapWidth;
            _hintWindow.Show();
        }
Exemplo n.º 2
0
 public HintRootWin32(Rect rect, HintSource source)
 {
     this.source = source;
     ActiveRect = rect;
     source.MouseMove += OnMouse;
     source.MouseLeave += OnMouse;
 }
Exemplo n.º 3
0
 public HintRootWin32(Rect rect, HintSource source)
 {
     this.source        = source;
     ActiveRect         = rect;
     source.MouseMove  += OnMouse;
     source.MouseLeave += OnMouse;
 }
Exemplo n.º 4
0
 void HintWindowClosed(object sender, EventArgs e)
 {
     _hintSource.UnSubClass();
     _hintSource = null;
     _hintWindow = null;
     if (Closed != null)
     {
         Closed(this);
     }
 }
Exemplo n.º 5
0
 public static HintRoot Create(Rect rect, HintSource source)
 {
     return(new HintRootWin32(rect, source));
 }
Exemplo n.º 6
0
 public HintRootWin32(Rect rect, HintSource source)
 {
     this.source = source;
     ActiveRect  = rect;
 }
Exemplo n.º 7
0
        private void Show(IntPtr owner)
        {
            if (InputManager.Current.IsInMenuMode)
                return;

            if (_hintWindow != null)
                throw new NotSupportedException("Hint already shown");

            // subclass
            _hintSource = new HintSource();
            _hintSource.Activate += Close;
            _hintSource.SubClass(owner);

            // create hint window
            var ht = HintRoot.Create(PlacementRect, _hintSource);
            _hintWindow = new HintWindow(this, ht) { Text = _text };
            _hintSource.HintWindow = _hintWindow;
            //new WindowInteropHelper(_hintWindow) { Owner = _hintSource.Owner };
            _hintWindow.Closed += HintWindowClosed;
            _hintWindow.MaxHeight = 1200.0;//System.Windows.Forms.Screen.FromRectangle(PlacementRect).WorkingArea.
            _wrapWidth = 1200.0;

            _hintWindow.WrapWidth = _wrapWidth;
            _hintWindow.Show();
        }
Exemplo n.º 8
0
 void HintWindowClosed(object sender, EventArgs e)
 {
     _hintSource.UnSubClass();
     _hintSource = null;
     _hintWindow = null;
     if (Closed != null) Closed(this);
 }
Exemplo n.º 9
0
 public HintRootWin32(Rect rect, HintSource source)
 {
     this.source = source;
     ActiveRect = rect;
 }
Exemplo n.º 10
0
 public static HintRoot Create(Rect rect, HintSource source)
 {
     return new HintRootWin32(rect, source);
 }