aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Popper.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-08-07 13:36:50 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2016-08-07 13:36:50 +0200
commit4d4a9116ea5c68b27f0b7c43db9682ab57738ae7 (patch)
treec0761af45b3ec3c6e109ebc6b27a57e4fa4175c3 /src/GraphicObjects/Popper.cs
parent3ba387d4424eac597c7d512664214dc2437007d0 (diff)
divers
Diffstat (limited to 'src/GraphicObjects/Popper.cs')
-rw-r--r--src/GraphicObjects/Popper.cs99
1 files changed, 44 insertions, 55 deletions
diff --git a/src/GraphicObjects/Popper.cs b/src/GraphicObjects/Popper.cs
index 14e7ec7a..0a013ae1 100644
--- a/src/GraphicObjects/Popper.cs
+++ b/src/GraphicObjects/Popper.cs
@@ -37,12 +37,54 @@ namespace Crow
bool _isPopped;
string caption;
- string image;
+ Alignment popDirection;
GraphicObject _content;
public event EventHandler Pop;
public event EventHandler Unpop;
+ #region Public Properties
+ [XmlAttributeAttribute()][DefaultValue("Popper")]
+ public string Caption {
+ get { return caption; }
+ set {
+ if (caption == value)
+ return;
+ caption = value;
+ NotifyValueChanged ("Caption", caption);
+ }
+ }
+ [XmlAttributeAttribute()][DefaultValue(false)]
+ public bool IsPopped
+ {
+ get { return _isPopped; }
+ set
+ {
+ if (value == _isPopped)
+ return;
+
+ _isPopped = value;
+ NotifyValueChanged ("IsPopped", _isPopped);
+
+ if (_isPopped)
+ onPop (this, null);
+ else
+ onUnpop (this, null);
+
+ }
+ }
+ [XmlAttributeAttribute()][DefaultValue(Alignment.Bottom)]
+ public virtual Alignment PopDirection {
+ get { return popDirection; }
+ set {
+ if (popDirection == value)
+ return;
+ popDirection = value;
+ NotifyValueChanged ("PopDirection", popDirection);
+ }
+ }
+ #endregion
+
public override GraphicObject Content {
get { return _content; }
set {
@@ -109,6 +151,7 @@ namespace Crow
}
}
+ #region GraphicObject overrides
public override void OnLayoutChanges (LayoutingType layoutType)
{
base.OnLayoutChanges (layoutType);
@@ -120,7 +163,6 @@ namespace Crow
_content.MinimumSize = new Size (this.Slot.Width, _content.MinimumSize.Height);
}
- #region GraphicObject overrides
public override void ClearBinding ()
{
//ensure popped window is cleared
@@ -156,59 +198,6 @@ namespace Crow
IsPopped = false;
}
#endregion
-
- #region Public Properties
- [XmlAttributeAttribute()][DefaultValue("Popper")]
- public string Caption {
- get { return caption; }
- set {
- if (caption == value)
- return;
- caption = value;
- NotifyValueChanged ("Caption", caption);
- }
- }
- [XmlAttributeAttribute()][DefaultValue("#Crow.Images.Icons.expandable.svg")]
- public string Image {
- get { return image; }
- set {
- if (image == value)
- return;
- image = value;
- NotifyValueChanged ("Image", image);
- }
- }
- [XmlAttributeAttribute()][DefaultValue(false)]
- public bool IsPopped
- {
- get { return _isPopped; }
- set
- {
- if (value == _isPopped)
- return;
-
- _isPopped = value;
- NotifyValueChanged ("IsPopped", _isPopped);
-
- if (_isPopped)
- onPop (this, null);
- else
- onUnpop (this, null);
-
- }
- }
- Alignment popDirection;
- [XmlAttributeAttribute()][DefaultValue(Alignment.Bottom)]
- public virtual Alignment PopDirection {
- get { return popDirection; }
- set {
- if (popDirection == value)
- return;
- popDirection = value;
- NotifyValueChanged ("PopDirection", popDirection);
- }
- }
- #endregion
public virtual void onPop(object sender, EventArgs e)
{