DescribeComponent() public static method

public static DescribeComponent ( object instance, IScriptComponentDescriptor descriptor, IUrlResolutionService urlResolver, IControlResolver controlResolver ) : void
instance object
descriptor IScriptComponentDescriptor
urlResolver IUrlResolutionService
controlResolver IControlResolver
return void
コード例 #1
0
        /// <summary>
        /// Describes the settings for this control.
        /// </summary>
        /// <param name="descriptor"></param>
        protected virtual void DescribeComponent(ScriptComponentDescriptor descriptor)
        {
            // TODO: consider setting _renderingScript = true/false;
            // see: ScriptControlBase implementation
            ComponentDescriber.DescribeComponent(this, new ScriptComponentDescriptorWrapper(descriptor), this.Page, this);

            if (SupportsClientState)
            {
                descriptor.AddElementProperty("clientStateField", ClientStateFieldID);
            }
        }
コード例 #2
0
        protected virtual void DescribeComponent(ScriptComponentDescriptor descriptor)
        {
            try {
                _renderingScript = true;
                ComponentDescriber.DescribeComponent(this, new ScriptComponentDescriptorWrapper(descriptor), this.Page, this);
            } finally {
                _renderingScript = false;
            }

            if (SupportsClientState)
            {
                descriptor.AddElementProperty("clientStateField", ClientStateFieldID);
            }
        }
コード例 #3
0
        protected virtual IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            if (!Visible)
            {
                return(null);
            }

            var descriptor = new ScriptControlDescriptor(ClientControlType, ClientID);

            ComponentDescriber.DescribeComponent(this, new ScriptComponentDescriptorWrapper(descriptor), this, this);
            descriptor.AddElementProperty("textBoxControl", TextBoxControl.ClientID);
            descriptor.AddElementProperty("buttonControl", ButtonControl.ClientID);
            descriptor.AddElementProperty("hiddenFieldControl", HiddenFieldControl.ClientID);
            descriptor.AddElementProperty("optionListControl", OptionListControl.ClientID);
            descriptor.AddElementProperty("comboTableControl", ComboTable.ClientID);
            descriptor.AddProperty("autoCompleteMode", AutoCompleteMode);
            descriptor.AddProperty("dropDownStyle", DropDownStyle);

            return(new List <ScriptDescriptor> {
                descriptor
            });
        }
コード例 #4
0
 // Walks each of the properties in the TargetProperties object and renders script for them.
 protected virtual void RenderScriptAttributes(ScriptBehaviorDescriptor descriptor)
 {
     try {
         ComponentDescriber.DescribeComponent(this, new ScriptComponentDescriptorWrapper(descriptor), this.Page, this);
     } finally { }
 }