aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Expandable.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2017-01-31 15:58:52 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2017-01-31 15:58:52 +0100
commitcfb314bd4fe70c83f43bb254bcc1bdb54b2dc827 (patch)
tree87c1a868c22ad302325cd55a4468a042e1ba437b /src/GraphicObjects/Expandable.cs
parent177aa594f6a93d4c8c9ee38546f12851782cb838 (diff)
move recurrent 'Caption' property in Templated Control
Diffstat (limited to 'src/GraphicObjects/Expandable.cs')
-rw-r--r--src/GraphicObjects/Expandable.cs25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/GraphicObjects/Expandable.cs b/src/GraphicObjects/Expandable.cs
index 38506de8..92cf1640 100644
--- a/src/GraphicObjects/Expandable.cs
+++ b/src/GraphicObjects/Expandable.cs
@@ -35,7 +35,6 @@ namespace Crow
#region Private fields
bool _isExpanded;
- string caption;
string image;
Container _contentContainer;
#endregion
@@ -70,26 +69,16 @@ namespace Crow
}
#region Public properties
- [XmlAttributeAttribute][DefaultValue("Expandable")]
- 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; }
+ get { return image; }
set {
if (image == value)
return;
- image = value;
+ image = value;
NotifyValueChanged ("Image", image);
}
- }
+ }
[XmlAttributeAttribute][DefaultValue(false)]
public bool IsExpanded
{
@@ -120,11 +109,11 @@ namespace Crow
[XmlIgnore]public bool IsExpandable {
get {
try {
- return GetIsExpandable == null ? true : GetIsExpandable (this);
+ return GetIsExpandable == null ? true : GetIsExpandable (this);
} catch (Exception ex) {
System.Diagnostics.Debug.WriteLine ("Not Expandable error: " + ex.ToString ());
return false;
- }
+ }
}
}
#endregion
@@ -133,14 +122,14 @@ namespace Crow
{
if (_contentContainer != null)
_contentContainer.Visible = true;
-
+
Expand.Raise (this, e);
}
public virtual void onCollapse(object sender, EventArgs e)
{
if (_contentContainer != null)
_contentContainer.Visible = false;
-
+
Collapse.Raise (this, e);
}
}