aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/ListBox.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-06-02 10:44:23 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-06-02 10:44:23 +0200
commitb56c22ad826a49b7ea0013c1ca78cf64169fc326 (patch)
tree588a3bc9ae0ed826012096a072b138a94ded4e61 /src/GraphicObjects/ListBox.cs
parent999f18b6daf7db54879a85f0f8b5c7b22f740ce7 (diff)
TemplatedControls, Picture objects for pixmap and svg raw data sharing
among controls
Diffstat (limited to 'src/GraphicObjects/ListBox.cs')
-rw-r--r--src/GraphicObjects/ListBox.cs31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/GraphicObjects/ListBox.cs b/src/GraphicObjects/ListBox.cs
index 970606c7..869eae2a 100644
--- a/src/GraphicObjects/ListBox.cs
+++ b/src/GraphicObjects/ListBox.cs
@@ -20,14 +20,31 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Collections;
+using System.Xml.Serialization;
+using System.ComponentModel;
namespace go
{
- public class ListBox : GraphicObject
+ public class ListBox : TemplatedControl
{
- IEnumerable data;
+ Group _list;
- public IEnumerable Data {
+ public ListBox () : base()
+ {
+ }
+
+ #region implemented abstract members of TemplatedControl
+ protected override void loadTemplate ()
+ {
+ this.setChild (Interface.Load ("#go.Templates.Listbox.goml"));
+ _list = this.child.FindByName ("List") as Group;
+ }
+ #endregion
+
+ IList data;
+
+ [XmlAttributeAttribute()][DefaultValue(null)]
+ public IList Data {
get {
return data;
}
@@ -37,15 +54,13 @@ namespace go
data = value;
+
foreach (var item in data) {
-
+ _list.addChild(Interface.Load ("#go.Templates.ItemTemplate.goml", item));
+
}
}
}
-
- public ListBox ()
- {
- }
}
}