Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebParts / CatalogPart.cs / 1 / CatalogPart.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; using System.Web.UI; ////// Provides default rendering and part selection UI /// [ Bindable(false), Designer("System.Web.UI.Design.WebControls.WebParts.CatalogPartDesigner, " + AssemblyRef.SystemDesign), ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public abstract class CatalogPart : Part { private WebPartManager _webPartManager; private CatalogZoneBase _zone; [ Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string DisplayTitle { get { string displayTitle = Title; if (String.IsNullOrEmpty(displayTitle)) { displayTitle = SR.GetString(SR.Part_Untitled); } return displayTitle; } } protected WebPartManager WebPartManager { get { return _webPartManager; } } protected CatalogZoneBase Zone { get { return _zone; } } public abstract WebPartDescriptionCollection GetAvailableWebPartDescriptions(); [SecurityPermission(SecurityAction.Demand, Unrestricted = true)] protected override IDictionary GetDesignModeState() { IDictionary state = new HybridDictionary(1); state["Zone"] = Zone; return state; } public abstract WebPart GetWebPart(WebPartDescription description); protected internal override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (Zone == null) { throw new InvalidOperationException(SR.GetString(SR.CatalogPart_MustBeInZone, ID)); } } [SecurityPermission(SecurityAction.Demand, Unrestricted = true)] protected override void SetDesignModeState(IDictionary data) { if (data != null) { object o = data["Zone"]; if (o != null) { SetZone((CatalogZoneBase)o); } } } internal void SetWebPartManager(WebPartManager webPartManager) { _webPartManager = webPartManager; } internal void SetZone(CatalogZoneBase zone) { _zone = zone; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ListViewDeletedEventArgs.cs
- ExtentCqlBlock.cs
- HashAlgorithm.cs
- FormViewInsertedEventArgs.cs
- ResourceSetExpression.cs
- ToolStripContentPanelDesigner.cs
- PropertyMap.cs
- DrawListViewSubItemEventArgs.cs
- DefaultWorkflowTransactionService.cs
- TextLine.cs
- ProcessModelSection.cs
- NotCondition.cs
- HuffmanTree.cs
- InstancePersistenceCommand.cs
- ProxyWebPartManager.cs
- ObjectItemLoadingSessionData.cs
- MessageBox.cs
- StorageFunctionMapping.cs
- Codec.cs
- OuterGlowBitmapEffect.cs
- AggregationMinMaxHelpers.cs
- WorkflowRuntime.cs
- IFlowDocumentViewer.cs
- DataSourceConverter.cs
- CompositeCollection.cs
- VirtualDirectoryMapping.cs
- DefaultAssemblyResolver.cs
- XLinq.cs
- ExpressionDumper.cs
- CodeTryCatchFinallyStatement.cs
- GACIdentityPermission.cs
- HtmlTextArea.cs
- LogicalTreeHelper.cs
- HtmlLink.cs
- TextBoxLine.cs
- LayoutUtils.cs
- DynamicValidator.cs
- ApplicationSecurityManager.cs
- ReadWriteSpinLock.cs
- ObjectListCommandsPage.cs
- DoubleAnimationBase.cs
- DbTransaction.cs
- SmiTypedGetterSetter.cs
- WebPartMenu.cs
- ExpressionBuilder.cs
- SymmetricKey.cs
- unsafeIndexingFilterStream.cs
- RelationshipEnd.cs
- PreloadedPackages.cs
- EntitySqlQueryCacheKey.cs
- FileSecurity.cs
- DataGridViewColumn.cs
- TableSectionStyle.cs
- StateMachineAction.cs
- TypeResolver.cs
- PageRequestManager.cs
- AmbientLight.cs
- SystemIPGlobalStatistics.cs
- TextBoxLine.cs
- MenuItemCollection.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- ObjectContext.cs
- XmlCompatibilityReader.cs
- ReadOnlyMetadataCollection.cs
- OlePropertyStructs.cs
- GeneralTransformGroup.cs
- ReadOnlyMetadataCollection.cs
- CacheEntry.cs
- ImmutableDispatchRuntime.cs
- OdbcException.cs
- ListViewItem.cs
- EdmType.cs
- ContainerActivationHelper.cs
- TypeContext.cs
- XmlSchemaDatatype.cs
- FunctionDetailsReader.cs
- SiteMapSection.cs
- ProviderConnectionPoint.cs
- OledbConnectionStringbuilder.cs
- VirtualDirectoryMappingCollection.cs
- DbConnectionPoolOptions.cs
- ProviderException.cs
- MoveSizeWinEventHandler.cs
- SimpleFieldTemplateUserControl.cs
- XmlEntity.cs
- NonValidatingSecurityTokenAuthenticator.cs
- HelloOperation11AsyncResult.cs
- TaskFormBase.cs
- URLAttribute.cs
- GeneralTransform.cs
- MessageEventSubscriptionService.cs
- HelpProvider.cs
- RoleManagerModule.cs
- ConfigXmlSignificantWhitespace.cs
- ButtonChrome.cs
- ElementProxy.cs
- documentsequencetextview.cs
- StylusPointProperties.cs
- QilParameter.cs