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
- CheckBoxField.cs
- TypeUtil.cs
- ArraySet.cs
- TextBoxRenderer.cs
- StringUtil.cs
- StringResourceManager.cs
- CallbackValidator.cs
- RadialGradientBrush.cs
- AnimationClockResource.cs
- HttpServerProtocol.cs
- HMACRIPEMD160.cs
- MethodAccessException.cs
- ParentUndoUnit.cs
- Rotation3DAnimation.cs
- ConfigPathUtility.cs
- WebRequestModuleElementCollection.cs
- XPathItem.cs
- XmlArrayItemAttribute.cs
- XPathEmptyIterator.cs
- ClientType.cs
- TagPrefixCollection.cs
- XPathNodeIterator.cs
- NavigationPropertySingletonExpression.cs
- RadialGradientBrush.cs
- formatter.cs
- TimerExtension.cs
- QilXmlWriter.cs
- ConfigurationManagerInternalFactory.cs
- DataGridViewColumnHeaderCell.cs
- TransportReplyChannelAcceptor.cs
- ViewgenContext.cs
- ListViewEditEventArgs.cs
- HtmlElementErrorEventArgs.cs
- Point4DValueSerializer.cs
- QuotaThrottle.cs
- DrawingGroup.cs
- TripleDES.cs
- COM2Properties.cs
- ScriptingSectionGroup.cs
- HashCodeCombiner.cs
- TemplatePagerField.cs
- _ServiceNameStore.cs
- ResourceDescriptionAttribute.cs
- InternalConfigHost.cs
- AttributeCollection.cs
- StatusStrip.cs
- TextRange.cs
- WizardPanelChangingEventArgs.cs
- Msmq.cs
- XPathAncestorQuery.cs
- TransactionFlowProperty.cs
- OleDbError.cs
- InternalsVisibleToAttribute.cs
- DeclarativeCatalogPartDesigner.cs
- MailDefinition.cs
- TrackingMemoryStream.cs
- StringFunctions.cs
- updateconfighost.cs
- SQLString.cs
- CreateUserErrorEventArgs.cs
- ConfigurationProperty.cs
- UInt16Converter.cs
- SizeIndependentAnimationStorage.cs
- FormViewInsertedEventArgs.cs
- EnvelopeVersion.cs
- StylusCollection.cs
- OperationAbortedException.cs
- BamlWriter.cs
- HtmlString.cs
- SubqueryRules.cs
- StateMachineSubscription.cs
- Exceptions.cs
- Run.cs
- HotSpotCollection.cs
- ACL.cs
- ResourceDefaultValueAttribute.cs
- CopyOnWriteList.cs
- SafeViewOfFileHandle.cs
- DynamicMethod.cs
- XmlHierarchyData.cs
- StrokeNodeOperations.cs
- WebPartDescription.cs
- UrlPath.cs
- ColorMap.cs
- JsonEncodingStreamWrapper.cs
- Win32Native.cs
- DataSourceView.cs
- ReliableSessionBindingElementImporter.cs
- SystemUnicastIPAddressInformation.cs
- XmlTextReaderImpl.cs
- ServiceDescriptionImporter.cs
- NumberSubstitution.cs
- SqlSelectStatement.cs
- ServiceSecurityAuditBehavior.cs
- ColorAnimationUsingKeyFrames.cs
- QueuePropertyVariants.cs
- Cursor.cs
- XmlMemberMapping.cs
- WorkflowDebuggerSteppingAttribute.cs
- OperandQuery.cs