Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / CatalogZone.cs / 1305376 / 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.Web.UI; using System.Web.UI.WebControls; using System.Web.Util; [ Designer("System.Web.UI.Design.WebControls.WebParts.CatalogZoneDesigner, " + AssemblyRef.SystemDesign), SupportsEventValidation, ] 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; } } } } // 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
- LayoutSettings.cs
- XmlnsDictionary.cs
- SingleAnimationUsingKeyFrames.cs
- AssemblySettingAttributes.cs
- TransactionsSectionGroup.cs
- Control.cs
- RecordsAffectedEventArgs.cs
- Pointer.cs
- Msec.cs
- COAUTHINFO.cs
- ConnectionProviderAttribute.cs
- FilteredDataSetHelper.cs
- XPathExpr.cs
- DataGridViewTopLeftHeaderCell.cs
- WindowsToolbarAsMenu.cs
- TreeNode.cs
- ObjectListTitleAttribute.cs
- JulianCalendar.cs
- storepermission.cs
- SystemIPAddressInformation.cs
- ParallelQuery.cs
- FormatterServices.cs
- BooleanProjectedSlot.cs
- EUCJPEncoding.cs
- PartEditor.cs
- ProtocolsConfiguration.cs
- DbConnectionHelper.cs
- TextSimpleMarkerProperties.cs
- ChtmlImageAdapter.cs
- ListViewGroup.cs
- FormViewDeletedEventArgs.cs
- TaskHelper.cs
- DataKey.cs
- DispatcherFrame.cs
- BooleanSwitch.cs
- TraceContextRecord.cs
- TraceListener.cs
- AppendHelper.cs
- RecordsAffectedEventArgs.cs
- JumpPath.cs
- ColumnMapTranslator.cs
- DataGridViewTopLeftHeaderCell.cs
- CacheMode.cs
- SecurityRuntime.cs
- ObjectDataSourceDisposingEventArgs.cs
- StringConverter.cs
- FixedSOMPage.cs
- ColorBlend.cs
- AssignDesigner.xaml.cs
- ValidationResult.cs
- DataBoundControlAdapter.cs
- RectangleConverter.cs
- TableRow.cs
- GlobalizationSection.cs
- DesignerFrame.cs
- HttpServerVarsCollection.cs
- AsyncOperationManager.cs
- DesignerDataSchemaClass.cs
- TextRangeEditTables.cs
- ButtonChrome.cs
- SQLDecimalStorage.cs
- WindowsFont.cs
- DataServices.cs
- Transaction.cs
- QuerySelectOp.cs
- EdmToObjectNamespaceMap.cs
- SafeRightsManagementSessionHandle.cs
- CssClassPropertyAttribute.cs
- Script.cs
- ListBindingConverter.cs
- PointHitTestParameters.cs
- BatchServiceHost.cs
- RightsManagementPermission.cs
- DocumentPageViewAutomationPeer.cs
- Site.cs
- NamedObject.cs
- ErrorStyle.cs
- TypeInitializationException.cs
- CodeDirectiveCollection.cs
- Border.cs
- MiniConstructorInfo.cs
- WebPartVerbCollection.cs
- Util.cs
- RemoteWebConfigurationHostServer.cs
- FixedHyperLink.cs
- WebServiceTypeData.cs
- Accessible.cs
- Message.cs
- Baml2006ReaderContext.cs
- ContainsRowNumberChecker.cs
- WebPartTransformer.cs
- StoreAnnotationsMap.cs
- WebContext.cs
- SecurityTokenParametersEnumerable.cs
- HttpProfileGroupBase.cs
- NavigateEvent.cs
- EncoderReplacementFallback.cs
- SimpleTypeResolver.cs
- SelectorItemAutomationPeer.cs
- DependencyObjectType.cs