Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / ListControlActionList.cs / 1 / ListControlActionList.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls { using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Design; using System.Diagnostics; using System.Web.UI.Design; using System.Web.UI.Design.Util; using System.Web.UI.WebControls; ///internal class ListControlActionList : DesignerActionList { private IDataSourceDesigner _dataSourceDesigner; private ListControlDesigner _listControlDesigner; /// public ListControlActionList(ListControlDesigner listControlDesigner, IDataSourceDesigner dataSourceDesigner) : base(listControlDesigner.Component) { _listControlDesigner = listControlDesigner; _dataSourceDesigner = dataSourceDesigner; } /// public bool AutoPostBack { get { return ((ListControl)_listControlDesigner.Component).AutoPostBack; } set { PropertyDescriptor autoPostBackDescriptor = TypeDescriptor.GetProperties(_listControlDesigner.Component)["AutoPostBack"]; autoPostBackDescriptor.SetValue(_listControlDesigner.Component, value); } } public override bool AutoShow { get { return true; } set { } } /// public void EditItems() { _listControlDesigner.EditItems(); } /// public void ConnectToDataSource() { _listControlDesigner.ConnectToDataSourceAction(); } /// public override DesignerActionItemCollection GetSortedActionItems() { DesignerActionItemCollection items = new DesignerActionItemCollection(); PropertyDescriptorCollection pdc = TypeDescriptor.GetProperties(_listControlDesigner.Component); PropertyDescriptor pd = pdc["DataSourceID"]; if (pd != null && pd.IsBrowsable) { items.Add(new DesignerActionMethodItem(this, "ConnectToDataSource", SR.GetString(SR.ListControl_ConfigureDataVerb), SR.GetString(SR.BaseDataBoundControl_DataActionGroup), SR.GetString(SR.BaseDataBoundControl_ConfigureDataVerbDesc))); } // add associated tasks ControlDesigner dsDesigner = _dataSourceDesigner as ControlDesigner; if (dsDesigner != null) { ((DesignerActionMethodItem)items[0]).RelatedComponent = dsDesigner.Component; } pd = pdc["Items"]; if (pd != null && pd.IsBrowsable) { items.Add(new DesignerActionMethodItem(this, "EditItems", SR.GetString(SR.ListControl_EditItems), "Actions", SR.GetString(SR.ListControl_EditItemsDesc))); } pd = pdc["AutoPostBack"]; if (pd != null && pd.IsBrowsable) { items.Add(new DesignerActionPropertyItem("AutoPostBack", SR.GetString(SR.ListControl_EnableAutoPostBack), "Behavior", SR.GetString(SR.ListControl_EnableAutoPostBackDesc))); } return items; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PlatformCulture.cs
- NetNamedPipeSecurity.cs
- QEncodedStream.cs
- QilScopedVisitor.cs
- NavigationProperty.cs
- XmlSchemaComplexContentExtension.cs
- PngBitmapDecoder.cs
- SynchronizedInputProviderWrapper.cs
- CryptoApi.cs
- ColumnReorderedEventArgs.cs
- KeyboardNavigation.cs
- WinInetCache.cs
- FixedSOMContainer.cs
- sqlinternaltransaction.cs
- AuthorizationRule.cs
- PointCollectionConverter.cs
- CompositeControl.cs
- ExpressionPrefixAttribute.cs
- ApplicationInfo.cs
- PrintingPermission.cs
- DataGridViewCellPaintingEventArgs.cs
- WebPartHeaderCloseVerb.cs
- SchemaInfo.cs
- MaterialCollection.cs
- NullableConverter.cs
- TreeNodeConverter.cs
- HtmlInputRadioButton.cs
- ItemsPresenter.cs
- Int64Converter.cs
- HyperLinkStyle.cs
- TreeNodeCollectionEditor.cs
- GPStream.cs
- WorkflowRuntimeElement.cs
- MenuCommand.cs
- XmlAnyElementAttributes.cs
- AttributeCollection.cs
- SignatureDescription.cs
- ADConnectionHelper.cs
- AssociationSet.cs
- DataObjectPastingEventArgs.cs
- UserNameSecurityToken.cs
- DesignTimeTemplateParser.cs
- QilList.cs
- ToolBar.cs
- XmlCDATASection.cs
- Missing.cs
- CodeRemoveEventStatement.cs
- DragDropManager.cs
- TimeoutValidationAttribute.cs
- DeviceSpecificDialogCachedState.cs
- SmtpClient.cs
- MasterPageCodeDomTreeGenerator.cs
- WebEvents.cs
- DeferredTextReference.cs
- ComponentCommands.cs
- AutomationPropertyInfo.cs
- ZipIOLocalFileBlock.cs
- Condition.cs
- PersistenceException.cs
- ObjectKeyFrameCollection.cs
- ChtmlMobileTextWriter.cs
- FormsAuthentication.cs
- SerializationInfoEnumerator.cs
- TextDecoration.cs
- ObjectViewListener.cs
- SystemColorTracker.cs
- WebServiceErrorEvent.cs
- ConfigXmlWhitespace.cs
- DataGridViewCellParsingEventArgs.cs
- WebPartDescriptionCollection.cs
- SQLSingle.cs
- Marshal.cs
- CompositeScriptReferenceEventArgs.cs
- ObjectStorage.cs
- InOutArgumentConverter.cs
- ProfileSettings.cs
- TextBoxBase.cs
- DataTableMappingCollection.cs
- TypeSource.cs
- UncommonField.cs
- DataServices.cs
- SoundPlayerAction.cs
- RecordsAffectedEventArgs.cs
- _UncName.cs
- X509ServiceCertificateAuthentication.cs
- BindingSource.cs
- Process.cs
- SequenceRangeCollection.cs
- DataGridViewColumnCollectionEditor.cs
- MemoryRecordBuffer.cs
- ButtonChrome.cs
- ButtonChrome.cs
- DataControlFieldsEditor.cs
- TableCell.cs
- HMACSHA256.cs
- ServiceDescriptions.cs
- Calendar.cs
- SQLCharsStorage.cs
- PathTooLongException.cs
- safesecurityhelperavalon.cs