Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / CatalogPart.cs / 1305376 / 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),
]
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;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SessionStateUtil.cs
- JoinGraph.cs
- WebEventCodes.cs
- WindowsRebar.cs
- safelinkcollection.cs
- Image.cs
- RootBrowserWindowAutomationPeer.cs
- OutArgument.cs
- PeerTransportCredentialType.cs
- TextEditorCopyPaste.cs
- SafeNativeMethods.cs
- TypeSource.cs
- PersistenceProviderBehavior.cs
- EmptyEnumerator.cs
- WebPartPersonalization.cs
- safex509handles.cs
- Identifier.cs
- ComplexTypeEmitter.cs
- ConfigViewGenerator.cs
- ScriptControlDescriptor.cs
- ResolveNameEventArgs.cs
- PolygonHotSpot.cs
- ThicknessAnimation.cs
- RootBrowserWindow.cs
- Missing.cs
- InkCanvas.cs
- EventMap.cs
- PageFunction.cs
- WebServiceParameterData.cs
- AbsoluteQuery.cs
- HtmlWindowCollection.cs
- CodeMethodInvokeExpression.cs
- FileEnumerator.cs
- TypeForwardedToAttribute.cs
- CreatingCookieEventArgs.cs
- GridViewRowPresenterBase.cs
- UserControl.cs
- PersistChildrenAttribute.cs
- DataGridBeginningEditEventArgs.cs
- AnimatedTypeHelpers.cs
- ColumnResizeUndoUnit.cs
- _IPv4Address.cs
- WebPartZone.cs
- TemplatePagerField.cs
- DecimalAnimation.cs
- MemberMaps.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- Graphics.cs
- XmlNamespaceMapping.cs
- StandardTransformFactory.cs
- Configuration.cs
- ReachPageContentSerializer.cs
- InfoCardRequestException.cs
- PreviewKeyDownEventArgs.cs
- DefaultClaimSet.cs
- CodeDelegateCreateExpression.cs
- Line.cs
- StylusPlugin.cs
- SystemIPv4InterfaceProperties.cs
- SqlConnectionFactory.cs
- AuthenticationServiceManager.cs
- HtmlAnchor.cs
- PortCache.cs
- NamedPipeProcessProtocolHandler.cs
- PtsCache.cs
- Itemizer.cs
- UnsafeNativeMethods.cs
- CapabilitiesRule.cs
- SafeMarshalContext.cs
- ColumnCollectionEditor.cs
- BaseComponentEditor.cs
- CachedPathData.cs
- Model3DGroup.cs
- AsyncStreamReader.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- XsltException.cs
- DataGridViewCellStyle.cs
- CroppedBitmap.cs
- DataMisalignedException.cs
- ProcessModuleCollection.cs
- LinqTreeNodeEvaluator.cs
- ObjectItemLoadingSessionData.cs
- ScrollChangedEventArgs.cs
- ItemsChangedEventArgs.cs
- HttpRuntimeSection.cs
- XmlSerializerVersionAttribute.cs
- RegistryPermission.cs
- ProcessProtocolHandler.cs
- Path.cs
- SoapElementAttribute.cs
- ToolStripPanelRenderEventArgs.cs
- SuppressMessageAttribute.cs
- FontResourceCache.cs
- EpmSyndicationContentSerializer.cs
- RangeValueProviderWrapper.cs
- AutomationEventArgs.cs
- GeneralTransform3DTo2DTo3D.cs
- ConfigurationValues.cs
- WindowsTreeView.cs
- CompilerError.cs