diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-15 15:39:16 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-15 15:39:16 +0100 |
| commit | 0bba9f0c7fb86e3af67f7ce8a0f42f87b914976c (patch) | |
| tree | 2dec4541ef1dc2c37baf99da77dd088a15d04826 /src/GraphicObjects/GraphicObject.cs | |
| parent | 1a1b87d5505bd98321dfcab4fb00da3ee5767a1c (diff) | |
Added Hoverable prop to GraphicObject, still have problem in tabview when hover another tab, content is also hover
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 02e5c863..d7585d58 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -69,6 +69,7 @@ namespace Crow double _cornerRadius = 0; int _margin = 0; bool _focusable = false; + bool hoverable = true; bool _hasFocus = false; bool _isActive = false; bool _mouseRepeat; @@ -272,6 +273,19 @@ namespace Crow Bounds.Width = Bounds.Height = -1; } } + /// <summary> + /// used to handle mouse hover in children instead of the whole container + /// </summary> + [XmlAttributeAttribute()][DefaultValue(true)] + public virtual bool Hoverable { + get { return hoverable; } + set { + if (hoverable == value) + return; + hoverable = value; + NotifyValueChanged ("Hoverable", hoverable); + } + } [XmlAttributeAttribute()][DefaultValue(false)] public virtual bool Focusable { get { return _focusable; } @@ -916,7 +930,7 @@ namespace Crow if (ScreenCoordinates (Slot).ContainsOrIsEqual (m)) { Scroller scr = Parent as Scroller; if (scr == null) - return true; + return Hoverable; return scr.MouseIsIn (scr.savedMousePos); } return false; |