2 // System.Web.UI.Design.TemplatedControlDesigner
5 // Gert Driesen (drieseng@users.sourceforge.net)
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 using System.Collections;
33 using System.ComponentModel;
34 using System.ComponentModel.Design;
36 namespace System.Web.UI.Design
38 public abstract class TemplatedControlDesigner : ControlDesigner
40 public TemplatedControlDesigner ()
45 public override void Initialize (IComponent component)
47 throw new NotImplementedException ();
50 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
51 protected abstract ITemplateEditingFrame CreateTemplateEditingFrame (TemplateEditingVerb verb);
53 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
54 protected abstract TemplateEditingVerb[] GetCachedTemplateEditingVerbs ();
56 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
57 public abstract string GetTemplateContent (ITemplateEditingFrame editingFrame, string templateName, out bool allowEditing);
59 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
60 public abstract void SetTemplateContent (ITemplateEditingFrame editingFrame, string templateName, string templateContent);
63 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
64 public void EnterTemplateMode (ITemplateEditingFrame newTemplateEditingFrame)
66 throw new NotImplementedException ();
70 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
71 public void ExitTemplateMode (bool fSwitchingTemplates, bool fNested, bool fSave)
73 throw new NotImplementedException ();
77 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
78 public virtual string GetTemplateContainerDataItemProperty (string templateName)
83 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
84 public virtual IEnumerable GetTemplateContainerDataSource (string templateName)
90 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
91 public TemplateEditingVerb[] GetTemplateEditingVerbs ()
93 throw new NotImplementedException ();
97 protected ITemplate GetTemplateFromText (string text)
99 throw new NotImplementedException ();
102 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
103 public virtual Type GetTemplatePropertyParentType (string templateName)
105 return base.Component.GetType ();
109 protected string GetTextFromTemplate (ITemplate template)
111 throw new NotImplementedException ();
115 [Obsolete ("Use ControlDesigner.Tag instead")]
116 protected override void OnBehaviorAttached ()
118 throw new NotImplementedException ();
122 public override void OnComponentChanged (object sender, ComponentChangedEventArgs ce)
124 throw new NotImplementedException ();
128 public override void OnSetParent ()
130 throw new NotImplementedException ();
134 protected virtual void OnTemplateModeChanged ()
136 throw new NotImplementedException ();
141 protected void SaveActiveTemplateEditingFrame ()
143 throw new NotImplementedException ();
147 public override void UpdateDesignTimeHtml ()
149 throw new NotImplementedException ();
152 protected override bool DataBindingsEnabled {
153 get { throw new NotImplementedException (); }
156 public override TemplateGroupCollection TemplateGroups {
157 get { throw new NotImplementedException (); }
160 [Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
161 public ITemplateEditingFrame ActiveTemplateEditingFrame {
163 return _activeTemplateFrame;
167 public bool CanEnterTemplateMode {
169 return _enableTemplateEditing;
174 [Obsolete ("Use ControlDesigner.InTemplateMode instead")]
175 public new bool InTemplateMode {
177 return _templateMode;
181 internal EventHandler TemplateEditingVerbHandler {
183 return _templateVerbHandler;
187 private ITemplateEditingFrame _activeTemplateFrame;
188 private bool _enableTemplateEditing = true;
189 private bool _templateMode;
190 private EventHandler _templateVerbHandler;