diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-06-10 10:30:48 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-06-10 10:30:49 +0200 |
| commit | 73c7ac95b12d72bcb3f5d549c76bdf0b5a093847 (patch) | |
| tree | d595f3e95d71c92e4d52a33f6a6411e5f7afbee3 /src/GraphicObjects | |
| parent | 578341c3e4410b803b65a739f950b103f3f0a95c (diff) | |
- fuse binding and event resolution contexts in GOMLResolver
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/Expandable.cs | 9 | ||||
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/GraphicObjects/Expandable.cs b/src/GraphicObjects/Expandable.cs index e3274ca0..6f215b2f 100644 --- a/src/GraphicObjects/Expandable.cs +++ b/src/GraphicObjects/Expandable.cs @@ -22,6 +22,7 @@ namespace go {
bool _isExpanded;
Label _caption;
+ Image _image;
public Container Content;
@@ -41,6 +42,14 @@ namespace go _caption = this.child.FindByName ("Caption") as Label;
Content = this.child.FindByName ("Content") as Container;
+ _image = this.child.FindByName ("Image") as Image;
+
+ if (_image == null)
+ return;
+ _image.SvgSub = "collapsed";
+ this.Expand += (object sender, EventArgs e) => {_image.SvgSub = "expanded";};
+ this.Collapse += (object sender, EventArgs e) => {_image.SvgSub = "collapsed";};
+
}
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 8098f863..9cafe13b 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -685,7 +685,7 @@ namespace go if (string.IsNullOrEmpty (handler))
continue;
- Interface.EventsToResolve.Add(new DynAttribute
+ Interface.GOMLResolver.Add(new DynAttribute
{
Source = this,
Value = handler,
@@ -770,7 +770,7 @@ namespace go throw new Exception (string.Format("GOML:Malformed binding: {0}", v));
string strBinding = v.Substring (1, v.Length - 2);
- Interface.Bindings.Add (new DynAttribute () {
+ Interface.GOMLResolver.Add (new DynAttribute () {
Source = this,
MemberName = name,
Value = strBinding
|