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
- ComponentCommands.cs
- IndexOutOfRangeException.cs
- CallbackWrapper.cs
- RegexRunnerFactory.cs
- GroupBox.cs
- DesignerOptionService.cs
- EnumValAlphaComparer.cs
- MetadataImporter.cs
- ResourcePool.cs
- PositiveTimeSpanValidatorAttribute.cs
- SchemaEntity.cs
- DataGridTableStyleMappingNameEditor.cs
- PropagatorResult.cs
- DecoderNLS.cs
- ResourceReferenceExpressionConverter.cs
- ExtendedPropertyDescriptor.cs
- DateRangeEvent.cs
- DocumentPageView.cs
- HtmlInputText.cs
- ActivityMetadata.cs
- XmlIncludeAttribute.cs
- ScrollContentPresenter.cs
- Walker.cs
- SqlBinder.cs
- ObjectViewListener.cs
- sortedlist.cs
- DataServiceConfiguration.cs
- ExpressionBuilderContext.cs
- XmlSchemaAll.cs
- MemberJoinTreeNode.cs
- GroupItemAutomationPeer.cs
- X500Name.cs
- SizeKeyFrameCollection.cs
- CodeSnippetTypeMember.cs
- DateTimeSerializationSection.cs
- _AcceptOverlappedAsyncResult.cs
- SHA1.cs
- CapabilitiesAssignment.cs
- DependencyObjectCodeDomSerializer.cs
- PixelShader.cs
- PageClientProxyGenerator.cs
- MatrixKeyFrameCollection.cs
- PrintPreviewGraphics.cs
- StylusPoint.cs
- LogArchiveSnapshot.cs
- InkCanvasFeedbackAdorner.cs
- CollectionConverter.cs
- FocusTracker.cs
- ControlCommandSet.cs
- AtomicFile.cs
- DelegateSerializationHolder.cs
- SizeConverter.cs
- Button.cs
- ConstructorBuilder.cs
- AssemblySettingAttributes.cs
- NamespaceQuery.cs
- OdbcConnectionPoolProviderInfo.cs
- FixedFlowMap.cs
- Geometry3D.cs
- ProtocolImporter.cs
- ErrorsHelper.cs
- ProxyWebPartManagerDesigner.cs
- DiscoveryMessageSequenceCD1.cs
- ClientConvert.cs
- PathGeometry.cs
- Missing.cs
- EntityDesignerUtils.cs
- MetadataExporter.cs
- Style.cs
- FileNameEditor.cs
- EntityDesignerUtils.cs
- ReflectionPermission.cs
- UseAttributeSetsAction.cs
- DataSourceCacheDurationConverter.cs
- XmlRootAttribute.cs
- HttpApplicationStateBase.cs
- ToolStripCodeDomSerializer.cs
- ObjectHandle.cs
- PermissionAttributes.cs
- EnumType.cs
- SectionVisual.cs
- AstTree.cs
- RuntimeEnvironment.cs
- CommonObjectSecurity.cs
- FeatureManager.cs
- FieldMetadata.cs
- XmlDataSource.cs
- MissingSatelliteAssemblyException.cs
- LeafCellTreeNode.cs
- WebPartCancelEventArgs.cs
- BindingContext.cs
- EventHandlerList.cs
- XmlSchemaCompilationSettings.cs
- GrammarBuilderPhrase.cs
- BindUriHelper.cs
- MetaModel.cs
- DbParameterCollectionHelper.cs
- CatalogZoneDesigner.cs
- DataControlFieldCell.cs
- BamlCollectionHolder.cs