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
- EdmMember.cs
- GeometryGroup.cs
- CutCopyPasteHelper.cs
- DiagnosticTrace.cs
- RTTypeWrapper.cs
- CipherData.cs
- Overlapped.cs
- ReadContentAsBinaryHelper.cs
- SecureStringHasher.cs
- ImageCodecInfo.cs
- XmlWrappingReader.cs
- TextChangedEventArgs.cs
- ConnectionConsumerAttribute.cs
- DetailsViewPageEventArgs.cs
- NumberFormatInfo.cs
- CodePageEncoding.cs
- VectorConverter.cs
- XPathQilFactory.cs
- JpegBitmapDecoder.cs
- ListenerSingletonConnectionReader.cs
- ConnectionAcceptor.cs
- RegexGroupCollection.cs
- OdbcConnection.cs
- OpenFileDialog.cs
- SettingsProviderCollection.cs
- ToolStripSeparatorRenderEventArgs.cs
- mda.cs
- SchemaImporter.cs
- PageRequestManager.cs
- WebEvents.cs
- ReachIDocumentPaginatorSerializer.cs
- _HeaderInfoTable.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- XmlWhitespace.cs
- SafeHandle.cs
- UnknownBitmapDecoder.cs
- TableAdapterManagerGenerator.cs
- GeneralTransform3DCollection.cs
- LocalizedNameDescriptionPair.cs
- NameObjectCollectionBase.cs
- DBSqlParserTableCollection.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- MobileControlPersister.cs
- SQLInt32Storage.cs
- SqlInternalConnectionTds.cs
- PasswordRecovery.cs
- AuthenticatingEventArgs.cs
- AsnEncodedData.cs
- ItemsPresenter.cs
- ViewPort3D.cs
- DesignTable.cs
- PreservationFileReader.cs
- Parsers.cs
- Ray3DHitTestResult.cs
- RectangleGeometry.cs
- mactripleDES.cs
- CurrentChangedEventManager.cs
- XmlSubtreeReader.cs
- TraceContextRecord.cs
- RegexGroup.cs
- Win32SafeHandles.cs
- XPathBinder.cs
- RegularExpressionValidator.cs
- OdbcPermission.cs
- ProcessInfo.cs
- CompositeScriptReferenceEventArgs.cs
- FontStretches.cs
- WindowsStreamSecurityElement.cs
- GifBitmapDecoder.cs
- HtmlHead.cs
- AsyncDataRequest.cs
- ResourcesBuildProvider.cs
- GZipStream.cs
- Mouse.cs
- CodeVariableDeclarationStatement.cs
- ListDictionaryInternal.cs
- XmlAttributeCache.cs
- CapabilitiesAssignment.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- InputLangChangeRequestEvent.cs
- Point4DConverter.cs
- DataGridViewUtilities.cs
- SpellerHighlightLayer.cs
- DictionaryItemsCollection.cs
- Util.cs
- EntityDataSourceWrapperCollection.cs
- DataServiceRequestException.cs
- BitmapEffectDrawingContextState.cs
- SafeNativeMethods.cs
- EraserBehavior.cs
- PeerNameRegistration.cs
- TriggerAction.cs
- WindowsStatic.cs
- EdmPropertyAttribute.cs
- ClientCultureInfo.cs
- OleDbRowUpdatingEvent.cs
- FormsAuthentication.cs
- XhtmlTextWriter.cs
- PageAsyncTaskManager.cs
- SchemaImporter.cs