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
- SerializationEventsCache.cs
- GenericParameterDataContract.cs
- KoreanLunisolarCalendar.cs
- CodeIndexerExpression.cs
- SerializationFieldInfo.cs
- XmlSignificantWhitespace.cs
- BehaviorService.cs
- ListViewEditEventArgs.cs
- MatcherBuilder.cs
- MetadataArtifactLoaderFile.cs
- BitmapDownload.cs
- NativeMethods.cs
- VectorCollection.cs
- TextViewBase.cs
- KoreanLunisolarCalendar.cs
- SecurityImpersonationBehavior.cs
- WpfPayload.cs
- InfoCardClaimCollection.cs
- SqlDataSourceQuery.cs
- PasswordBoxAutomationPeer.cs
- ToolStripLocationCancelEventArgs.cs
- StreamWriter.cs
- ComponentDispatcherThread.cs
- VisemeEventArgs.cs
- PixelFormat.cs
- MemberHolder.cs
- ECDiffieHellman.cs
- TemplateBindingExtensionConverter.cs
- DesignerTransaction.cs
- ToolboxControl.cs
- FileChangesMonitor.cs
- WebPartsPersonalizationAuthorization.cs
- SizeFConverter.cs
- Window.cs
- EntityConnection.cs
- Crypto.cs
- UidManager.cs
- ErrorInfoXmlDocument.cs
- ObjectPersistData.cs
- FileSecurity.cs
- ThreadAbortException.cs
- ReversePositionQuery.cs
- DefaultParameterValueAttribute.cs
- BuilderPropertyEntry.cs
- _NegoState.cs
- AxHostDesigner.cs
- UserNameSecurityTokenProvider.cs
- ChtmlCalendarAdapter.cs
- ConfigXmlComment.cs
- Visual3D.cs
- odbcmetadatacollectionnames.cs
- PersianCalendar.cs
- HelloMessageCD1.cs
- DataGrid.cs
- QueryCacheKey.cs
- ManualResetEvent.cs
- _SecureChannel.cs
- CalendarAutomationPeer.cs
- Speller.cs
- UserControlAutomationPeer.cs
- BlurBitmapEffect.cs
- WorkflowServiceNamespace.cs
- DataGridRowHeader.cs
- DataServiceException.cs
- CodeObject.cs
- SafeCertificateContext.cs
- SurrogateEncoder.cs
- StreamResourceInfo.cs
- SubstitutionList.cs
- SqlDataSourceStatusEventArgs.cs
- SelectionHighlightInfo.cs
- URLAttribute.cs
- Image.cs
- FamilyMap.cs
- SHA256.cs
- Soap.cs
- Task.cs
- UIPermission.cs
- SubMenuStyleCollectionEditor.cs
- PropertyRecord.cs
- NumberSubstitution.cs
- EventSourceCreationData.cs
- XmlSchemaSimpleTypeUnion.cs
- InfoCardArgumentException.cs
- BrowserDefinitionCollection.cs
- RijndaelManagedTransform.cs
- DependencySource.cs
- MetadataException.cs
- sqlser.cs
- DbRetry.cs
- QilGenerator.cs
- TraversalRequest.cs
- RelatedView.cs
- _DomainName.cs
- InfiniteTimeSpanConverter.cs
- DataGridViewTextBoxEditingControl.cs
- PageBreakRecord.cs
- URLString.cs
- EntityTypeEmitter.cs
- GridSplitterAutomationPeer.cs