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
- GroupBox.cs
- PageDeviceFont.cs
- XmlDocument.cs
- FacetChecker.cs
- SelectionService.cs
- SafeHandles.cs
- SqlParameterizer.cs
- AssemblyNameProxy.cs
- ListSortDescriptionCollection.cs
- StylusPointPropertyInfo.cs
- Guid.cs
- SchemaElementDecl.cs
- ReflectTypeDescriptionProvider.cs
- ThreadExceptionDialog.cs
- DodSequenceMerge.cs
- MenuScrollingVisibilityConverter.cs
- VectorAnimationBase.cs
- WorkflowApplicationAbortedException.cs
- TdsParameterSetter.cs
- XmlMemberMapping.cs
- WebEventCodes.cs
- BufferedWebEventProvider.cs
- DateTimeFormatInfo.cs
- HttpResponseHeader.cs
- DocumentViewerAutomationPeer.cs
- Configuration.cs
- DbProviderFactories.cs
- ImmutableObjectAttribute.cs
- ObjectSecurity.cs
- ScrollPatternIdentifiers.cs
- PartialTrustVisibleAssemblyCollection.cs
- SecurityTokenException.cs
- DetailsViewRowCollection.cs
- FontDifferentiator.cs
- RenderingEventArgs.cs
- IsolatedStorageFileStream.cs
- EntityClassGenerator.cs
- OdbcRowUpdatingEvent.cs
- DirectoryInfo.cs
- SubtreeProcessor.cs
- SemaphoreFullException.cs
- TextControlDesigner.cs
- StrokeRenderer.cs
- AppLevelCompilationSectionCache.cs
- PartialArray.cs
- DBSqlParserTableCollection.cs
- CatalogZoneBase.cs
- AppLevelCompilationSectionCache.cs
- EventlogProvider.cs
- DataControlCommands.cs
- FieldNameLookup.cs
- AdobeCFFWrapper.cs
- ExpressionPrefixAttribute.cs
- JumpPath.cs
- objectresult_tresulttype.cs
- BrowserCapabilitiesCompiler.cs
- GroupQuery.cs
- HtmlInputFile.cs
- Internal.cs
- MetabaseServerConfig.cs
- SafeCryptHandles.cs
- MulticastDelegate.cs
- SqlDataSourceStatusEventArgs.cs
- Paragraph.cs
- DynamicContractTypeBuilder.cs
- ToolStripDropTargetManager.cs
- CopyAttributesAction.cs
- SmtpAuthenticationManager.cs
- ForceCopyBuildProvider.cs
- JsonReaderDelegator.cs
- BroadcastEventHelper.cs
- Container.cs
- EditCommandColumn.cs
- DiscreteKeyFrames.cs
- ShaperBuffers.cs
- InfoCardServiceInstallComponent.cs
- SoapCommonClasses.cs
- TypeCodeDomSerializer.cs
- ClientApiGenerator.cs
- RichTextBox.cs
- ToolBar.cs
- IdentityHolder.cs
- DesigntimeLicenseContext.cs
- WizardStepCollectionEditor.cs
- CustomDictionarySources.cs
- ItemMap.cs
- UncommonField.cs
- cookieexception.cs
- ServiceChannelProxy.cs
- MasterPageParser.cs
- IDQuery.cs
- CustomBindingElement.cs
- PingOptions.cs
- AssemblyHash.cs
- TextTrailingCharacterEllipsis.cs
- XmlAttribute.cs
- BehaviorDragDropEventArgs.cs
- FixedDSBuilder.cs
- XmlSchemaDocumentation.cs
- AdornerPresentationContext.cs