+2005-09-14 Chris Toshok <toshok@ximian.com>
+
+ * Microsoft.Web.Atlas.dll.sources: add DraggableListItem.cs
+
+ * Microsoft.Web.UI/HoverBehavior.cs (AddAttributesToElement): add
+ comment about how MS NRE's here in our tests.
+ (InitializeTypeDescriptor): fix the ServerPropertyName for
+ "hoverElement".
+
+ * Microsoft.Web.UI/DraggableListItem.cs (AddAttributesToElement):
+ add comment about how MS NRE's here in our tests.
+
+ * Microsoft.Web.UI/DataSourceDropTarget.cs
+ (AddAttributesToElement): add comment about how MS NRE's here in
+ our tests.
+
+ * Microsoft.Web.UI/FloatingBehavior.cs (AddAttributesToElement):
+ add comment about how MS NRE's here in our tests.
+
+ * Microsoft.Web/Binding.cs: new implementation.
+
+ * Microsoft.Web/BindingDirection.cs: fix ordering on enum.
+
2005-09-14 Chris Toshok <toshok@ximian.com>
* Microsoft.Web.Atlas_test.dll.sources: add BindingTest and
Microsoft.Web.UI/ClickBehavior.cs
Microsoft.Web.UI/DataSourceDropTarget.cs
Microsoft.Web.UI/DragDropList.cs
+Microsoft.Web.UI/DraggableListItem.cs
Microsoft.Web.UI/DragMode.cs
Microsoft.Web.UI/FloatingBehavior.cs
Microsoft.Web.UI/HoverBehavior.cs
protected override void AddAttributesToElement (ScriptTextWriter writer)
{
base.AddAttributesToElement (writer);
+
+ // MS raises a NRE when this is called from
+ // our tests. speculation: they're accessing
+ // Browser or Page to figure out if they
+ // should be rendering attributes.
}
protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
protected override void AddAttributesToElement (ScriptTextWriter writer)
{
base.AddAttributesToElement (writer);
+
+ // MS raises a NRE when this is called from
+ // our tests. speculation: they're accessing
+ // Browser or Page to figure out if they
+ // should be rendering attributes.
}
protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
--- /dev/null
+//
+// Microsoft.Web.UI.DraggableListItem
+//
+// Author:
+// Chris Toshok (toshok@ximian.com)
+//
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace Microsoft.Web.UI
+{
+ public class DraggableListItem : Behavior
+ {
+ public DraggableListItem ()
+ {
+ }
+
+ protected override void AddAttributesToElement (ScriptTextWriter writer)
+ {
+ base.AddAttributesToElement (writer);
+
+ // MS raises a NRE when this is called from
+ // our tests. speculation: they're accessing
+ // Browser or Page to figure out if they
+ // should be rendering attributes.
+ }
+
+ protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
+ {
+ base.InitializeTypeDescriptor (typeDescriptor);
+
+ typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("data", ScriptType.Object, false, ""));
+ typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("handle", ScriptType.Object, false, "Handle"));
+ typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("dragVisualTemplate", ScriptType.Object, false, ""));
+ }
+
+ string handle = null;
+ public string Handle {
+ get {
+ return handle;
+ }
+ set {
+ handle = value;
+ }
+ }
+
+ public override string TagName {
+ get {
+ return "draggableListItem";
+ }
+ }
+ }
+}
+
+#endif
protected override void AddAttributesToElement (ScriptTextWriter writer)
{
base.AddAttributesToElement (writer);
+
+ // MS raises a NRE when this is called from
+ // our tests. speculation: they're accessing
+ // Browser or Page to figure out if they
+ // should be rendering attributes.
}
protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
protected override void AddAttributesToElement (ScriptTextWriter writer)
{
base.AddAttributesToElement (writer);
+
+ // MS raises a NRE when this is called from
+ // our tests. speculation: they're accessing
+ // Browser or Page to figure out if they
+ // should be rendering attributes.
}
protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
typeDescriptor.AddEvent (new ScriptEventDescriptor ("hover", true));
typeDescriptor.AddEvent (new ScriptEventDescriptor ("unhover", true));
- typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("hoverElement", ScriptType.Object, false, "HoverElementID"));
+ typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("hoverElement", ScriptType.Object, false, ""));
typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("unhoverDelay", ScriptType.Number, false, "UnhoverDelay"));
}
{
public Binding ()
{
- throw new NotImplementedException ();
}
+ bool automatic = true;
public bool Automatic {
get {
- throw new NotImplementedException ();
+ return automatic;
}
set {
- throw new NotImplementedException ();
+ automatic = value;
}
}
+ string dataContext = "";
public string DataContext {
get {
- throw new NotImplementedException ();
+ return dataContext;
}
set {
- throw new NotImplementedException ();
+ dataContext = (value == null ? "" : value);
}
}
+ string dataPath = "";
public string DataPath {
get {
- throw new NotImplementedException ();
+ return dataPath;
}
set {
- throw new NotImplementedException ();
+ dataPath = (value == null ? "" : value);
}
}
+ BindingDirection direction = BindingDirection.In;
public BindingDirection Direction {
get {
- throw new NotImplementedException ();
+ return direction;
}
set {
- throw new NotImplementedException ();
+ direction = value;
}
}
+ string id = "";
public string ID {
get {
- throw new NotImplementedException ();
+ return id;
}
set {
- throw new NotImplementedException ();
+ id = (value == null ? "" : value);
}
}
+ string property = "";
public string Property {
get {
- throw new NotImplementedException ();
+ return property;
}
set {
- throw new NotImplementedException ();
+ property = (value == null ? "" : value);
}
}
+ string propertyKey = "";
public string PropertyKey {
get {
- throw new NotImplementedException ();
+ return propertyKey;
}
set {
- throw new NotImplementedException ();
+ propertyKey = (value == null ? "" : value);
}
}
+ TransformScriptEvent transform;
public TransformScriptEvent Transform {
get {
- throw new NotImplementedException ();
+ if (transform == null)
+ transform = new TransformScriptEvent (this);
+
+ return transform;
}
}
+ string transformerArgument = "";
public string TransformerArgument {
get {
- throw new NotImplementedException ();
+ return transformerArgument;
}
set {
- throw new NotImplementedException ();
+ transformerArgument = (value == null ? "" : value);
}
}
public void RenderScript (ScriptTextWriter writer)
{
- throw new NotImplementedException ();
+ writer.WriteStartElement ("binding");
+
+ if (Automatic == false)
+ writer.WriteAttributeString ("automatic", Automatic.ToString());
+
+ if (DataContext != "")
+ writer.WriteAttributeString ("dataContext", DataContext);
+
+ if (DataPath != "")
+ writer.WriteAttributeString ("dataPath", DataPath);
+
+ if (Direction != BindingDirection.In)
+ writer.WriteAttributeString ("direction", Direction.ToString());
+
+ if (ID != "")
+ writer.WriteAttributeString ("id", ID);
+
+ if (Property != "")
+ writer.WriteAttributeString ("property", Property);
+
+ if (PropertyKey != "")
+ writer.WriteAttributeString ("propertyKey", PropertyKey);
+
+ if (TransformerArgument != "")
+ writer.WriteAttributeString ("transformerArgument", TransformerArgument);
+
+ writer.WriteEndElement ();
}
public IScriptObject Owner {
get {
- throw new NotImplementedException ();
+ return null;
}
}
ScriptTypeDescriptor IScriptObject.GetTypeDescriptor ()
{
- throw new NotImplementedException ();
+ ScriptTypeDescriptor d = new ScriptTypeDescriptor (this);
+
+ d.AddEvent (new ScriptEventDescriptor ("transform", false));
+
+ d.AddMethod (new ScriptMethodDescriptor ("evaluateIn", new string[0]));
+ d.AddMethod (new ScriptMethodDescriptor ("evaluateOut", new string[0]));
+
+ d.AddProperty (new ScriptPropertyDescriptor ("automatic", ScriptType.Boolean, false, "Automatic"));
+ d.AddProperty (new ScriptPropertyDescriptor ("dataContext", ScriptType.Object, false, "DataContext"));
+ d.AddProperty (new ScriptPropertyDescriptor ("dataPath", ScriptType.String, false, "DataPath"));
+ d.AddProperty (new ScriptPropertyDescriptor ("direction", ScriptType.Enum, false, "Direction"));
+ d.AddProperty (new ScriptPropertyDescriptor ("id", ScriptType.String, false, "ID"));
+ d.AddProperty (new ScriptPropertyDescriptor ("property", ScriptType.String, false, "Property"));
+ d.AddProperty (new ScriptPropertyDescriptor ("propertyKey", ScriptType.String, false, "PropertyKey"));
+ d.AddProperty (new ScriptPropertyDescriptor ("transformerArgument", ScriptType.String, false, "TransformerArgument"));
+
+ d.Close ();
+
+ return d;
}
}
}
public enum BindingDirection
{
In,
- InOut,
- Out
+ Out,
+ InOut
}
}