Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebParts / EditorZoneAutoFormat.cs / 1 / EditorZoneAutoFormat.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls.WebParts { using System.Data; using System.Design; using System.Web.UI.WebControls.WebParts; internal sealed class EditorZoneAutoFormat : BaseAutoFormat { internal const string PreviewControlID = "AutoFormatPreviewControl"; public EditorZoneAutoFormat(DataRow schemeData) : base(schemeData) { Style.Height = 275; Style.Width = 300; } public override Control GetPreviewControl(Control runtimeControl) { EditorZone previewZone = (EditorZone)base.GetPreviewControl(runtimeControl); // If the zone contains no EditorParts, set the ZoneTemplate to a dummy Template, so // that there is at least one EditorPart in the AutoFormat preview if (previewZone != null && previewZone.EditorParts.Count == 0) { previewZone.ZoneTemplate = new AutoFormatTemplate(); } // Set the ID of the zone to the special PreviewControlID, so the EditorZoneDesigner // doesn't render the placeholder for this control in the AutoFormat dialog, regardless // of whether ViewInEditMode is true. previewZone.ID = PreviewControlID; return previewZone; } private sealed class AutoFormatTemplate : ITemplate { public void InstantiateIn(Control container) { LayoutEditorPart layoutEditorPart = new LayoutEditorPart(); layoutEditorPart.ID = "LayoutEditorPart"; container.Controls.Add(layoutEditorPart); } } } } // 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
- ServiceMetadataContractBehavior.cs
- SQLUtility.cs
- WebConfigurationHost.cs
- ListView.cs
- UnknownBitmapDecoder.cs
- baseaxisquery.cs
- TdsParserSafeHandles.cs
- ErrorRuntimeConfig.cs
- CqlWriter.cs
- UnknownBitmapDecoder.cs
- DocumentReference.cs
- PositiveTimeSpanValidatorAttribute.cs
- ProcessModuleCollection.cs
- ImpersonationContext.cs
- TableItemStyle.cs
- DataGridItem.cs
- ProfessionalColorTable.cs
- SqlDependencyUtils.cs
- RoutingService.cs
- MonitoringDescriptionAttribute.cs
- RangeValuePattern.cs
- ZipIOExtraFieldPaddingElement.cs
- RepeaterItemEventArgs.cs
- SafeMemoryMappedViewHandle.cs
- TableLayoutColumnStyleCollection.cs
- DependencyStoreSurrogate.cs
- QueryOperatorEnumerator.cs
- StringWriter.cs
- SchemaImporter.cs
- ToolStripOverflow.cs
- BamlResourceContent.cs
- PolicyStatement.cs
- BehaviorService.cs
- ChannelCredentials.cs
- FillRuleValidation.cs
- RequestCachePolicy.cs
- AnnotationResourceChangedEventArgs.cs
- ProfileInfo.cs
- ClientTargetSection.cs
- ConfigViewGenerator.cs
- _Events.cs
- PageAsyncTaskManager.cs
- SystemWebCachingSectionGroup.cs
- Animatable.cs
- DateTimeFormatInfoScanner.cs
- ContainerUIElement3D.cs
- ProtocolElementCollection.cs
- BStrWrapper.cs
- WebPartTransformer.cs
- CompoundFileIOPermission.cs
- DataGridItem.cs
- SecurityProtocol.cs
- TypeValidationEventArgs.cs
- BulletedList.cs
- Serializer.cs
- AttributeUsageAttribute.cs
- DefaultPrintController.cs
- XmlnsDictionary.cs
- FormattedText.cs
- COM2Properties.cs
- PenContexts.cs
- SafeArrayRankMismatchException.cs
- XmlUnspecifiedAttribute.cs
- QuaternionKeyFrameCollection.cs
- StringInfo.cs
- PlanCompiler.cs
- VisualBrush.cs
- GuidConverter.cs
- StickyNoteContentControl.cs
- IntegerValidatorAttribute.cs
- Subset.cs
- TakeOrSkipWhileQueryOperator.cs
- GlobalEventManager.cs
- NameNode.cs
- MachineKeyConverter.cs
- ActivityExecutorDelegateInfo.cs
- XmlSchemaSimpleType.cs
- SessionChannels.cs
- PanelDesigner.cs
- ScrollViewer.cs
- messageonlyhwndwrapper.cs
- CalendarDesigner.cs
- Int16Converter.cs
- FormsAuthentication.cs
- MD5.cs
- MappedMetaModel.cs
- MaskedTextBoxDesignerActionList.cs
- Operators.cs
- RightsDocument.cs
- VolatileEnlistmentState.cs
- HexParser.cs
- RuleInfoComparer.cs
- ServiceContractDetailViewControl.cs
- RetrieveVirtualItemEventArgs.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- XmlSchemaAnnotation.cs
- documentsequencetextview.cs
- ComponentResourceKeyConverter.cs
- StorageEndPropertyMapping.cs
- RuntimeWrappedException.cs