Code:
/ DotNET / DotNET / 8.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
- SqlAliaser.cs
- StylusPointProperty.cs
- DataFieldConverter.cs
- ParserHooks.cs
- ToolStripSeparatorRenderEventArgs.cs
- XhtmlCssHandler.cs
- EFDataModelProvider.cs
- SignatureToken.cs
- LabelDesigner.cs
- WebPartConnectionsEventArgs.cs
- RTLAwareMessageBox.cs
- TypeRestriction.cs
- Transform3DGroup.cs
- DataGridRow.cs
- XpsFontSubsetter.cs
- PartialClassGenerationTaskInternal.cs
- StringSource.cs
- ReceiveDesigner.xaml.cs
- Unit.cs
- StrongName.cs
- WebPartEditorOkVerb.cs
- SerTrace.cs
- AspNetCompatibilityRequirementsMode.cs
- AsymmetricSecurityProtocol.cs
- RootAction.cs
- List.cs
- CustomTrackingRecord.cs
- FormViewActionList.cs
- SplitContainerDesigner.cs
- StoreItemCollection.cs
- ClientSettings.cs
- WebPartDescription.cs
- PackageRelationship.cs
- PageSettings.cs
- RSAPKCS1SignatureDeformatter.cs
- ContentDesigner.cs
- PackWebRequest.cs
- TextEmbeddedObject.cs
- StreamUpgradeProvider.cs
- RegistryKey.cs
- ListItemParagraph.cs
- Scene3D.cs
- precedingquery.cs
- ImageDrawing.cs
- DelimitedListTraceListener.cs
- ResXFileRef.cs
- SspiSafeHandles.cs
- MdImport.cs
- BamlResourceDeserializer.cs
- oledbmetadatacollectionnames.cs
- ValidationHelper.cs
- ScrollEventArgs.cs
- WebPartTransformerCollection.cs
- DataSet.cs
- InteropDesigner.xaml.cs
- ConfigXmlElement.cs
- ListViewDeleteEventArgs.cs
- PartitionedStreamMerger.cs
- PolicyException.cs
- ConfigurationPropertyAttribute.cs
- VariableBinder.cs
- DrawingVisualDrawingContext.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- HttpRuntime.cs
- CommonDialog.cs
- StsCommunicationException.cs
- ValidatedControlConverter.cs
- HttpListenerResponse.cs
- SqlUtil.cs
- Rfc4050KeyFormatter.cs
- HttpBrowserCapabilitiesWrapper.cs
- MultipleCopiesCollection.cs
- SafeProcessHandle.cs
- CreateUserWizardStep.cs
- AvTraceDetails.cs
- InputBuffer.cs
- ImageAttributes.cs
- BitmapCodecInfoInternal.cs
- AttributeCollection.cs
- SweepDirectionValidation.cs
- TagPrefixInfo.cs
- PageParserFilter.cs
- DesignBindingConverter.cs
- PointConverter.cs
- ProfessionalColors.cs
- SqlClientMetaDataCollectionNames.cs
- TemplateBamlTreeBuilder.cs
- Expression.cs
- PenCursorManager.cs
- ObjectToIdCache.cs
- Container.cs
- Random.cs
- DictionaryBase.cs
- WebBrowserProgressChangedEventHandler.cs
- InputScopeAttribute.cs
- DataGridColumnReorderingEventArgs.cs
- Parser.cs
- ExpanderAutomationPeer.cs
- DayRenderEvent.cs
- DrawingContextWalker.cs