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
- TreeViewHitTestInfo.cs
- CriticalExceptions.cs
- NonBatchDirectoryCompiler.cs
- MenuScrollingVisibilityConverter.cs
- ContextMarshalException.cs
- ClientBuildManagerCallback.cs
- ToolboxItemCollection.cs
- CodeCatchClauseCollection.cs
- ToggleButtonAutomationPeer.cs
- XmlSerializerOperationGenerator.cs
- DoubleAnimationUsingPath.cs
- UnmanagedMemoryAccessor.cs
- MeasureItemEvent.cs
- EvidenceTypeDescriptor.cs
- DelegateSerializationHolder.cs
- PrintPageEvent.cs
- WinEventQueueItem.cs
- nulltextnavigator.cs
- HttpRuntime.cs
- CalculatedColumn.cs
- ImageAnimator.cs
- WpfGeneratedKnownProperties.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- Attribute.cs
- InplaceBitmapMetadataWriter.cs
- View.cs
- HttpSocketManager.cs
- TemplatedAdorner.cs
- Freezable.cs
- Transform.cs
- DataRelationPropertyDescriptor.cs
- X509Certificate.cs
- HandlerFactoryCache.cs
- ToolStripDropDownMenu.cs
- ProtectedProviderSettings.cs
- GCHandleCookieTable.cs
- ReadOnlyPropertyMetadata.cs
- MetadataItemEmitter.cs
- SectionXmlInfo.cs
- CodeAttributeArgumentCollection.cs
- Scheduler.cs
- QueryRewriter.cs
- TableProviderWrapper.cs
- XmlSchemaObjectTable.cs
- SamlAuthenticationStatement.cs
- XmlBoundElement.cs
- SafeThemeHandle.cs
- PropertyChangedEventArgs.cs
- DataSysAttribute.cs
- FontNamesConverter.cs
- DataListItem.cs
- StatusBarItem.cs
- EtwTrace.cs
- DataTableClearEvent.cs
- RenamedEventArgs.cs
- WinOEToolBoxItem.cs
- EncodingInfo.cs
- GridToolTip.cs
- CallbackCorrelationInitializer.cs
- OutputCacheProfileCollection.cs
- ListItemCollection.cs
- SqlFacetAttribute.cs
- AppearanceEditorPart.cs
- ComponentEditorPage.cs
- AssemblyUtil.cs
- ArgumentReference.cs
- XmlSchemaAttribute.cs
- SQLUtility.cs
- DataServiceHost.cs
- WebHttpBehavior.cs
- GlyphsSerializer.cs
- RowTypePropertyElement.cs
- TargetConverter.cs
- XComponentModel.cs
- EventMap.cs
- XmlILAnnotation.cs
- BuildDependencySet.cs
- ToolStripDropDown.cs
- CachedTypeface.cs
- SQLGuid.cs
- DataViewManager.cs
- MonitorWrapper.cs
- SqlBulkCopyColumnMappingCollection.cs
- PropertyStore.cs
- HtmlTernaryTree.cs
- DataGridViewRowCancelEventArgs.cs
- UrlAuthFailedErrorFormatter.cs
- XamlTypeWithExplicitNamespace.cs
- NonBatchDirectoryCompiler.cs
- BooleanKeyFrameCollection.cs
- ImageButton.cs
- HttpFileCollection.cs
- AssemblyCache.cs
- Timer.cs
- ClientConfigurationSystem.cs
- NameScopePropertyAttribute.cs
- HttpListenerRequest.cs
- QueryContinueDragEventArgs.cs
- wgx_commands.cs