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
- AttributeUsageAttribute.cs
- StringExpressionSet.cs
- WindowVisualStateTracker.cs
- DispatcherBuilder.cs
- SqlClientFactory.cs
- HtmlSelect.cs
- DataGridViewCellParsingEventArgs.cs
- NGCPageContentSerializerAsync.cs
- ApplicationServiceHelper.cs
- ConnectionOrientedTransportManager.cs
- OleDbEnumerator.cs
- XmlException.cs
- KeyEventArgs.cs
- CodeTypeReferenceCollection.cs
- ImageListStreamer.cs
- AndCondition.cs
- SmtpNtlmAuthenticationModule.cs
- InputScope.cs
- Propagator.Evaluator.cs
- RootNamespaceAttribute.cs
- DoubleAnimationUsingKeyFrames.cs
- Soap.cs
- XPathSelfQuery.cs
- KeyedCollection.cs
- TextEditor.cs
- FileDialogCustomPlace.cs
- TargetInvocationException.cs
- MessageDecoder.cs
- RuleInfoComparer.cs
- BitmapFrame.cs
- WorkflowPersistenceService.cs
- RegexNode.cs
- RequestDescription.cs
- CursorEditor.cs
- DesignerView.xaml.cs
- CommandID.cs
- ListViewUpdatedEventArgs.cs
- CustomAttributeFormatException.cs
- Native.cs
- ProtocolsConfigurationHandler.cs
- RequestContext.cs
- StylusShape.cs
- VarRemapper.cs
- PageRequestManager.cs
- AsymmetricKeyExchangeFormatter.cs
- ImportOptions.cs
- RestHandlerFactory.cs
- EntityDataSourceContextCreatingEventArgs.cs
- QueryValue.cs
- Int64Storage.cs
- PersistenceTypeAttribute.cs
- ReadOnlyHierarchicalDataSource.cs
- ExeConfigurationFileMap.cs
- ModelPerspective.cs
- ButtonRenderer.cs
- SrgsDocumentParser.cs
- TdsValueSetter.cs
- GrammarBuilderBase.cs
- ColumnMapCopier.cs
- WindowsToolbarAsMenu.cs
- SystemParameters.cs
- DateTimeOffset.cs
- ObjectStateManager.cs
- ErasingStroke.cs
- XMLSchema.cs
- OletxCommittableTransaction.cs
- WebPartTransformerAttribute.cs
- RemotingConfigParser.cs
- PerspectiveCamera.cs
- XmlSchemaDocumentation.cs
- ProcessHostServerConfig.cs
- CapacityStreamGeometryContext.cs
- Deflater.cs
- SemanticBasicElement.cs
- FixedPageStructure.cs
- FixedHyperLink.cs
- ViewDesigner.cs
- SocketAddress.cs
- Size3D.cs
- SortFieldComparer.cs
- WebContext.cs
- PageParser.cs
- QueryInterceptorAttribute.cs
- SqlConnectionString.cs
- BmpBitmapEncoder.cs
- TextAnchor.cs
- ClientFormsAuthenticationCredentials.cs
- AttachedAnnotationChangedEventArgs.cs
- WbmpConverter.cs
- EpmSyndicationContentDeSerializer.cs
- DragDeltaEventArgs.cs
- ReliableSessionElement.cs
- OracleColumn.cs
- Helper.cs
- PublishLicense.cs
- PasswordTextNavigator.cs
- ColorAnimationUsingKeyFrames.cs
- SqlDataSourceParameterParser.cs
- SmtpFailedRecipientsException.cs
- SchemaLookupTable.cs