Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebParts / WebZoneDesigner.cs / 1 / WebZoneDesigner.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls.WebParts { using System; using System.ComponentModel; using System.Web.UI.Design; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; // Note that we derive from ControlDesigner instead of CompositeControlDesigner, even though WebZone // derives from CompositeControl. The issue is that CompositeControlDesigner forces the child // controls to be created before calling base.GetDesignTimeHtml(). However, we do not want to force // this child controls to be created, since we explicitly clear the Controls collection before // calling base.GetDesignTimeHtml(). We do this because if a single WebPart has an error, we want to // render an exception for just that WebPart, not the whole WebPartZone. [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)] public abstract class WebZoneDesigner : ControlDesigner { internal const string _templateName = "ZoneTemplate"; // Internal to prevent subclassing outside this assembly internal WebZoneDesigner() { } internal TemplateDefinition TemplateDefinition { get { return new TemplateDefinition(this, _templateName, Component, _templateName, ((WebControl)ViewControl).ControlStyle, true); } } internal TemplateGroup CreateZoneTemplateGroup() { TemplateGroup zoneTemplateGroup = new TemplateGroup(_templateName, ((WebControl)ViewControl).ControlStyle); zoneTemplateGroup.AddTemplateDefinition(new TemplateDefinition(this, _templateName, Component, _templateName, ((WebControl)ViewControl).ControlStyle)); return zoneTemplateGroup; } protected override bool UsePreviewControl { get { return true; } } public override void Initialize(IComponent component) { VerifyInitializeArgument(component, typeof(WebZone)); base.Initialize(component); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Size3DConverter.cs
- EmbossBitmapEffect.cs
- WebHttpEndpointElement.cs
- WindowsImpersonationContext.cs
- Typography.cs
- BaseDataListDesigner.cs
- BuildResultCache.cs
- ThreadPoolTaskScheduler.cs
- OdbcConnectionStringbuilder.cs
- WorkflowMessageEventArgs.cs
- EnumValAlphaComparer.cs
- DataGridAutoFormatDialog.cs
- DesignerHierarchicalDataSourceView.cs
- Int32KeyFrameCollection.cs
- DocComment.cs
- EnvironmentPermission.cs
- ColumnHeaderConverter.cs
- FrameAutomationPeer.cs
- RegexMatch.cs
- PeerTransportSecurityElement.cs
- DateTimeFormatInfoScanner.cs
- IODescriptionAttribute.cs
- WindowsRebar.cs
- CollectionType.cs
- XPathSelectionIterator.cs
- AppearanceEditorPart.cs
- EnumerableRowCollectionExtensions.cs
- BitArray.cs
- DataGridViewSortCompareEventArgs.cs
- XmlAttribute.cs
- wgx_exports.cs
- IUnknownConstantAttribute.cs
- TextureBrush.cs
- Query.cs
- TcpStreams.cs
- Environment.cs
- TextServicesCompartmentContext.cs
- Int32Storage.cs
- XamlPathDataSerializer.cs
- DockingAttribute.cs
- RestClientProxyHandler.cs
- ExternalFile.cs
- PolicyException.cs
- DragDrop.cs
- metadatamappinghashervisitor.cs
- WmlLiteralTextAdapter.cs
- ProfessionalColorTable.cs
- HelloMessageApril2005.cs
- EngineSite.cs
- CheckBox.cs
- LinkedResourceCollection.cs
- TdsParserSessionPool.cs
- ZoneIdentityPermission.cs
- SqlBulkCopyColumnMapping.cs
- Bold.cs
- DataGridItemCollection.cs
- FilteredReadOnlyMetadataCollection.cs
- ObjectListDesigner.cs
- HttpProfileGroupBase.cs
- OutputCacheProfile.cs
- SqlCommand.cs
- ExecutionEngineException.cs
- ExpandCollapseProviderWrapper.cs
- UpdatePanelTrigger.cs
- TextSegment.cs
- ArcSegment.cs
- EdmFunctions.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- ErrorHandler.cs
- EtwTrackingBehavior.cs
- DataTableReader.cs
- GridViewHeaderRowPresenter.cs
- ReadOnlyCollectionBuilder.cs
- FontSource.cs
- __ComObject.cs
- Calendar.cs
- DBParameter.cs
- XmlSchemaGroup.cs
- Crc32.cs
- LoadWorkflowByKeyAsyncResult.cs
- MergeFilterQuery.cs
- MimePart.cs
- WebHttpSecurity.cs
- ConditionalDesigner.cs
- TargetConverter.cs
- UserControlCodeDomTreeGenerator.cs
- XmlExpressionDumper.cs
- TagPrefixCollection.cs
- HttpPostProtocolImporter.cs
- ConfigXmlSignificantWhitespace.cs
- PhysicalAddress.cs
- StatusBar.cs
- SqlDependencyUtils.cs
- XmlElementCollection.cs
- MessageTraceRecord.cs
- LinqExpressionNormalizer.cs
- UserControlParser.cs
- SettingsBase.cs
- FeatureManager.cs
- QueryAccessibilityHelpEvent.cs