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
- MenuItem.cs
- PackageDocument.cs
- ArraySortHelper.cs
- Timer.cs
- InnerItemCollectionView.cs
- TiffBitmapEncoder.cs
- CompilationUtil.cs
- OdbcParameter.cs
- DependencyObjectProvider.cs
- SqlProcedureAttribute.cs
- ControlEvent.cs
- COAUTHIDENTITY.cs
- InboundActivityHelper.cs
- TaiwanCalendar.cs
- ClaimTypeElement.cs
- SqlInfoMessageEvent.cs
- UnknownBitmapEncoder.cs
- MetadataException.cs
- StorageBasedPackageProperties.cs
- SamlDelegatingWriter.cs
- SingletonConnectionReader.cs
- HtmlInputControl.cs
- StylusTip.cs
- HuffmanTree.cs
- ImageConverter.cs
- CallbackValidator.cs
- WaitHandle.cs
- GridViewSortEventArgs.cs
- HuffmanTree.cs
- NetStream.cs
- XmlSchemaValidationException.cs
- TemplateBuilder.cs
- XmlReturnReader.cs
- XPathMessageFilter.cs
- PageBuildProvider.cs
- DocumentPaginator.cs
- EntityContainerAssociationSet.cs
- StickyNoteHelper.cs
- PopupRoot.cs
- ApplicationFileCodeDomTreeGenerator.cs
- TextParagraph.cs
- VisualStyleRenderer.cs
- ObjectIDGenerator.cs
- MessageOperationFormatter.cs
- SiteMapNodeItem.cs
- MetadataException.cs
- DispatchWrapper.cs
- SpellerInterop.cs
- RuleInfoComparer.cs
- GrabHandleGlyph.cs
- SEHException.cs
- SqlReferenceCollection.cs
- InputLangChangeRequestEvent.cs
- CurrentChangingEventArgs.cs
- Grid.cs
- SequentialOutput.cs
- Faults.cs
- ObjectRef.cs
- HttpCookiesSection.cs
- MailMessage.cs
- PersonalizationState.cs
- DynamicValueConverter.cs
- SchemaTypeEmitter.cs
- RelatedCurrencyManager.cs
- DataGridViewCellStyle.cs
- AuthStoreRoleProvider.cs
- ArithmeticException.cs
- DurableInstance.cs
- AppDomainEvidenceFactory.cs
- FixedPageStructure.cs
- AggregateNode.cs
- MachineKeyConverter.cs
- RelativeSource.cs
- CustomValidator.cs
- TextRange.cs
- ChtmlTextBoxAdapter.cs
- CellConstantDomain.cs
- TagPrefixCollection.cs
- InvokePattern.cs
- SafeSecurityHandles.cs
- PageStatePersister.cs
- ReceiveActivityValidator.cs
- EdmMember.cs
- PropertyPushdownHelper.cs
- ToolStripSeparator.cs
- URLAttribute.cs
- XamlSerializerUtil.cs
- ParameterCollection.cs
- CreateUserWizardStep.cs
- PropertyChangeTracker.cs
- StatusStrip.cs
- FaultPropagationQuery.cs
- Rectangle.cs
- RelationshipConverter.cs
- HttpModulesSection.cs
- Geometry3D.cs
- TagPrefixCollection.cs
- FindResponse.cs
- JsonStringDataContract.cs
- Exceptions.cs