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
- XmlSchemaAppInfo.cs
- EventLogEntry.cs
- DataGridViewLayoutData.cs
- PiiTraceSource.cs
- EncryptedKeyHashIdentifierClause.cs
- PanelDesigner.cs
- HtmlForm.cs
- PageTheme.cs
- DataFormats.cs
- ExtractorMetadata.cs
- UDPClient.cs
- Empty.cs
- ipaddressinformationcollection.cs
- MetadataException.cs
- SetState.cs
- BasicExpandProvider.cs
- WebPartEventArgs.cs
- ObjectComplexPropertyMapping.cs
- BitVector32.cs
- DataSourceProvider.cs
- InternalSendMessage.cs
- PrivateFontCollection.cs
- XamlGridLengthSerializer.cs
- DBSchemaTable.cs
- NavigationProperty.cs
- ToolbarAUtomationPeer.cs
- UIElement3D.cs
- BufferModesCollection.cs
- SignatureHelper.cs
- ReadOnlyObservableCollection.cs
- RouteData.cs
- SizeChangedEventArgs.cs
- TypefaceMetricsCache.cs
- TextDecorationLocationValidation.cs
- SoapExtensionReflector.cs
- UTF32Encoding.cs
- SiteMapSection.cs
- WebPart.cs
- TableRowCollection.cs
- InvalidFilterCriteriaException.cs
- AbstractExpressions.cs
- SmiRequestExecutor.cs
- XmlLoader.cs
- DependencyObjectCodeDomSerializer.cs
- WindowsIdentity.cs
- TableParaClient.cs
- FixUp.cs
- AutomationPatternInfo.cs
- LinearKeyFrames.cs
- PrivilegedConfigurationManager.cs
- ConfigurationFileMap.cs
- AnimationTimeline.cs
- EmbossBitmapEffect.cs
- Journaling.cs
- KeyBinding.cs
- TransactionManager.cs
- DragStartedEventArgs.cs
- CustomAttributeSerializer.cs
- ContextStack.cs
- ObjectListComponentEditor.cs
- PeerNameRegistration.cs
- MatrixUtil.cs
- QueryContinueDragEventArgs.cs
- ZipIOCentralDirectoryBlock.cs
- ToolTip.cs
- TextClipboardData.cs
- CompilationUtil.cs
- JournalNavigationScope.cs
- LoadWorkflowByKeyAsyncResult.cs
- LayoutManager.cs
- SafeBitVector32.cs
- ProtectedProviderSettings.cs
- EmbeddedMailObject.cs
- CustomAttributeBuilder.cs
- ZipIOBlockManager.cs
- XmlSignificantWhitespace.cs
- Memoizer.cs
- BrowserDefinitionCollection.cs
- TaiwanCalendar.cs
- UseAttributeSetsAction.cs
- DataServiceClientException.cs
- Nullable.cs
- StringValidator.cs
- ProxyManager.cs
- PointHitTestParameters.cs
- StyleXamlParser.cs
- MatchAllMessageFilter.cs
- DataSourceIDConverter.cs
- SByte.cs
- System.Data_BID.cs
- odbcmetadatacolumnnames.cs
- XamlSerializationHelper.cs
- LayoutEngine.cs
- TransformProviderWrapper.cs
- FixedDocument.cs
- ScriptResourceHandler.cs
- IgnoreDataMemberAttribute.cs
- ExclusiveHandleList.cs
- ScriptResourceDefinition.cs
- InheritedPropertyDescriptor.cs