diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-10-13 16:57:26 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-10-13 16:57:26 +0200 |
| commit | 6bedf8d5d0b78ba0705e37375d8dee016e87ebbb (patch) | |
| tree | 4dabb643902d9ed30d185f9356bc3a17115011f8 /src/GraphicObjects/Combobox.cs | |
| parent | 97536ca0666ce95a598569afbaa8657e54e48439 (diff) | |
- GraphicTree parsing bindings in templates instead of using
datasource which could be kept for other uses
- ListBox bindings debug
- LogicalParent for Popper to get correct DataSource for content
Diffstat (limited to 'src/GraphicObjects/Combobox.cs')
| -rw-r--r-- | src/GraphicObjects/Combobox.cs | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/GraphicObjects/Combobox.cs b/src/GraphicObjects/Combobox.cs index 02040570..3e841793 100644 --- a/src/GraphicObjects/Combobox.cs +++ b/src/GraphicObjects/Combobox.cs @@ -22,7 +22,7 @@ namespace go {
[DefaultTemplate("#go.Templates.Combobox.goml")]
[DefaultOverlayTemplate("#go.Templates.ComboboxOverlay.goml")]
- public class Combobox : TemplatedContainer
+ public class Combobox : TemplatedControl
{
#region CTOR
public Combobox() : base(){ }
@@ -48,21 +48,22 @@ namespace go base.loadTemplate (template);
loadOverlayTemplate (null);
}
- public override GraphicObject Content {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
+// public override GraphicObject Content {
+// get {
+// throw new NotImplementedException ();
+// }
+// set {
+// throw new NotImplementedException ();
+// }
+// }
#endregion
protected virtual void loadOverlayTemplate(GraphicObject overlayTemplate)
{
if (overlayTemplate == null) {
DefaultOverlayTemplate dt = (DefaultOverlayTemplate)this.GetType ().GetCustomAttributes (typeof(DefaultOverlayTemplate), true).FirstOrDefault ();
- Overlay = Interface.Load (dt.Path, this, !Interface.DontResoveGOML);
+ Overlay = Interface.Load (dt.Path);
+ Overlay.ResolveBindings ();
} else
Overlay = overlayTemplate;
_list = Overlay.FindByName ("List") as Group;
@@ -173,8 +174,9 @@ namespace go lock (pendingChildrenAddition) {
if (!threadedLoadingFinished && pendingChildrenAddition.Count < 50)
return;
- while (pendingChildrenAddition.Count > 0)
+ while (pendingChildrenAddition.Count > 0) {
_list.addChild (pendingChildrenAddition.Dequeue ());
+ }
}
}
@@ -198,7 +200,8 @@ namespace go foreach (var item in data) {
ms.Seek(0,SeekOrigin.Begin);
- GraphicObject g = Interface.Load (ms, t, item);
+ GraphicObject g = Interface.Load (ms, t);
+ g.DataSource = item;
g.MouseClick += itemClick;
lock (pendingChildrenAddition) {
@@ -348,5 +351,6 @@ namespace go base.ClearBinding ();
}
+
}
}
|