Code:
/ FX-1434 / FX-1434 / 1.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
- DataServiceHostFactory.cs
- EventSourceCreationData.cs
- ADMembershipProvider.cs
- RenderOptions.cs
- Attributes.cs
- ToolBarButtonClickEvent.cs
- IList.cs
- wmiprovider.cs
- MergeFilterQuery.cs
- XmlSignatureManifest.cs
- ResourceContainerWrapper.cs
- SqlParameterCollection.cs
- ViewEventArgs.cs
- ButtonBase.cs
- ResourcePermissionBase.cs
- DomainConstraint.cs
- TextDecoration.cs
- WebPartDisplayMode.cs
- Char.cs
- CodeFieldReferenceExpression.cs
- ComponentSerializationService.cs
- UIElementHelper.cs
- PaintValueEventArgs.cs
- TimeoutException.cs
- VectorAnimationUsingKeyFrames.cs
- SQLByte.cs
- SelectorAutomationPeer.cs
- JulianCalendar.cs
- FocusChangedEventArgs.cs
- RankException.cs
- AudioFormatConverter.cs
- OracleLob.cs
- CorrelationManager.cs
- DataGridView.cs
- OpCodes.cs
- BitmapEffectvisualstate.cs
- SelectionList.cs
- QilStrConcat.cs
- TextBoxRenderer.cs
- Pair.cs
- VectorValueSerializer.cs
- TemplateControl.cs
- DataReceivedEventArgs.cs
- ByteStreamGeometryContext.cs
- SqlBooleanizer.cs
- RoutedEventArgs.cs
- PersonalizationStateInfoCollection.cs
- X509Certificate2.cs
- OpacityConverter.cs
- ClientBuildManager.cs
- Configuration.cs
- TextCharacters.cs
- FloaterBaseParagraph.cs
- RestHandlerFactory.cs
- MatrixTransform.cs
- WmpBitmapEncoder.cs
- MarkupCompilePass1.cs
- SimpleType.cs
- Block.cs
- PLINQETWProvider.cs
- SatelliteContractVersionAttribute.cs
- WebPartDisplayModeCollection.cs
- SqlConnection.cs
- Thread.cs
- SingleStorage.cs
- FileSystemInfo.cs
- URLAttribute.cs
- ICspAsymmetricAlgorithm.cs
- CodeGenerator.cs
- ToolStripScrollButton.cs
- Variable.cs
- IntSecurity.cs
- panel.cs
- ToolStripHighContrastRenderer.cs
- DTCTransactionManager.cs
- X509Extension.cs
- XmlCodeExporter.cs
- RealizationDrawingContextWalker.cs
- XmlNamespaceDeclarationsAttribute.cs
- StorageAssociationTypeMapping.cs
- DataControlPagerLinkButton.cs
- configsystem.cs
- LoginCancelEventArgs.cs
- CapabilitiesState.cs
- ConnectionConsumerAttribute.cs
- Sentence.cs
- RawAppCommandInputReport.cs
- TrackBar.cs
- Type.cs
- SwitchLevelAttribute.cs
- LicenseException.cs
- FontCacheUtil.cs
- PolicyStatement.cs
- KeyFrames.cs
- QfeChecker.cs
- UncommonField.cs
- FormViewPageEventArgs.cs
- DataChangedEventManager.cs
- WebDescriptionAttribute.cs
- CodeConstructor.cs