Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebParts / CatalogZone.cs / 1 / CatalogZone.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System.Collections; using System.Collections.Specialized; using System.ComponentModel; using System.Drawing; using System.Globalization; using System.Security.Permissions; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Util; [ Designer("System.Web.UI.Design.WebControls.WebParts.CatalogZoneDesigner, " + AssemblyRef.SystemDesign), SupportsEventValidation, ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class CatalogZone : CatalogZoneBase { private ITemplate _zoneTemplate; protected override CatalogPartCollection CreateCatalogParts() { CatalogPartCollection catalogParts = new CatalogPartCollection(); if (_zoneTemplate != null) { // PERF: Instantiate the template into a special control, that does nothing when a child control // is added. This is more performant because the child control is never parented to the temporary // control, it's ID is never generated, etc. Control container = new NonParentingControl(); _zoneTemplate.InstantiateIn(container); if (container.HasControls()) { foreach (Control control in container.Controls) { CatalogPart part = control as CatalogPart; if (part != null) { catalogParts.Add(part); } else { LiteralControl literal = control as LiteralControl; // Throw an exception if it is *not* a literal containing only whitespace // Don't throw an exception in the designer, since we want only the offending // control to render as an error block, not the whole CatalogZone. if (((literal == null) || (literal.Text.Trim().Length != 0)) && !DesignMode) { throw new InvalidOperationException(SR.GetString(SR.CatalogZone_OnlyCatalogParts, ID)); } } } } } return catalogParts; } [ Browsable(false), DefaultValue(null), PersistenceMode(PersistenceMode.InnerProperty), TemplateContainer(typeof(CatalogZone)), TemplateInstance(TemplateInstance.Single) ] public virtual ITemplate ZoneTemplate { get { return _zoneTemplate; } set { InvalidateCatalogParts(); _zoneTemplate = value; } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridClipboardCellContent.cs
- HtmlElement.cs
- DataGridTextColumn.cs
- ConfigurationSettings.cs
- PointValueSerializer.cs
- XmlILAnnotation.cs
- SqlSelectStatement.cs
- ProxyFragment.cs
- SettingsPropertyNotFoundException.cs
- HyperLinkField.cs
- PointHitTestResult.cs
- MinimizableAttributeTypeConverter.cs
- ResourceManagerWrapper.cs
- ChangePassword.cs
- KoreanCalendar.cs
- IIS7WorkerRequest.cs
- WebBrowser.cs
- SplayTreeNode.cs
- ProviderConnectionPointCollection.cs
- Oid.cs
- PropertyGridView.cs
- XmlSiteMapProvider.cs
- IpcManager.cs
- GeometryDrawing.cs
- DataGridCommandEventArgs.cs
- SqlClientPermission.cs
- SmiContextFactory.cs
- TaskFormBase.cs
- ColumnClickEvent.cs
- KeyedCollection.cs
- FloaterParaClient.cs
- Utilities.cs
- ConstraintConverter.cs
- CompoundFileIOPermission.cs
- DataTemplate.cs
- TreeNodeEventArgs.cs
- AuditLogLocation.cs
- SmiEventSink_DeferedProcessing.cs
- XmlObjectSerializerReadContextComplexJson.cs
- ColorMap.cs
- HMACSHA512.cs
- OAVariantLib.cs
- QueryAsyncResult.cs
- HtmlTableRowCollection.cs
- ServiceBusyException.cs
- ConsoleKeyInfo.cs
- FileRecordSequenceHelper.cs
- HttpRequest.cs
- MDIControlStrip.cs
- DbParameterHelper.cs
- RepeatButton.cs
- EventBuilder.cs
- GenericTypeParameterBuilder.cs
- ArgumentReference.cs
- RotateTransform3D.cs
- TerminateWorkflow.cs
- TypeForwardedFromAttribute.cs
- InputLanguageManager.cs
- WebBrowserProgressChangedEventHandler.cs
- ConfigXmlReader.cs
- OpenTypeCommon.cs
- Rules.cs
- HashSetEqualityComparer.cs
- UIElement.cs
- LineServicesRun.cs
- PauseStoryboard.cs
- ScrollableControlDesigner.cs
- RedistVersionInfo.cs
- ClientUrlResolverWrapper.cs
- CurrencyWrapper.cs
- TraceContext.cs
- Translator.cs
- PageContent.cs
- HtmlPhoneCallAdapter.cs
- DataGridViewColumnHeaderCell.cs
- keycontainerpermission.cs
- ZipPackagePart.cs
- AtlasWeb.Designer.cs
- StylusPointProperty.cs
- EntityDataSourceUtil.cs
- safePerfProviderHandle.cs
- WebSysDefaultValueAttribute.cs
- TextViewBase.cs
- OraclePermission.cs
- InvokePattern.cs
- _UriSyntax.cs
- SqlFormatter.cs
- TemplateColumn.cs
- CompositeTypefaceMetrics.cs
- XmlILStorageConverter.cs
- DispatchWrapper.cs
- ContentHostHelper.cs
- ColumnHeader.cs
- ExitEventArgs.cs
- AssociatedControlConverter.cs
- HttpStreamXmlDictionaryWriter.cs
- Screen.cs
- PropertiesTab.cs
- RowTypePropertyElement.cs
- XsdDateTime.cs