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
- StandardOleMarshalObject.cs
- WebHttpBindingCollectionElement.cs
- WindowsRichEdit.cs
- HttpServerChannel.cs
- Menu.cs
- SqlCommandBuilder.cs
- ToolStripGrip.cs
- ComponentCommands.cs
- Hash.cs
- UpdateException.cs
- SortAction.cs
- TextEditorThreadLocalStore.cs
- SyntaxCheck.cs
- IisTraceWebEventProvider.cs
- WsatStrings.cs
- CompilationRelaxations.cs
- XPathMultyIterator.cs
- RMEnrollmentPage3.cs
- TextureBrush.cs
- ClientProxyGenerator.cs
- SmiRecordBuffer.cs
- Dictionary.cs
- HWStack.cs
- HttpClientCertificate.cs
- FileSystemEventArgs.cs
- Type.cs
- CacheForPrimitiveTypes.cs
- EdmRelationshipRoleAttribute.cs
- CharacterMetrics.cs
- HierarchicalDataSourceDesigner.cs
- Point.cs
- GridViewUpdateEventArgs.cs
- Matrix3DConverter.cs
- SEHException.cs
- FrameworkObject.cs
- GPPOINTF.cs
- PropertyGeneratedEventArgs.cs
- BuildProvider.cs
- RelatedView.cs
- IndexerNameAttribute.cs
- ValuePattern.cs
- LocalBuilder.cs
- CodeDOMUtility.cs
- SafeReversePInvokeHandle.cs
- ImageButton.cs
- XmlSchema.cs
- KeyboardNavigation.cs
- GeneralTransform2DTo3DTo2D.cs
- HashMembershipCondition.cs
- SubMenuStyle.cs
- safelink.cs
- AssociationTypeEmitter.cs
- EventLogPermissionEntry.cs
- DynamicResourceExtension.cs
- DynamicEntity.cs
- PersianCalendar.cs
- TextWriter.cs
- MethodBuilder.cs
- UntypedNullExpression.cs
- SecurityContextCookieSerializer.cs
- TextServicesCompartment.cs
- CheckBoxField.cs
- ModuleBuilder.cs
- DrawingAttributes.cs
- TransformerInfo.cs
- IisTraceListener.cs
- HttpChannelFactory.cs
- VariableValue.cs
- WebPartConnectVerb.cs
- OleDbConnection.cs
- Tile.cs
- glyphs.cs
- SafeFindHandle.cs
- PropertyEmitterBase.cs
- RankException.cs
- IISMapPath.cs
- Font.cs
- AggregateNode.cs
- PrintPageEvent.cs
- SurrogateEncoder.cs
- ClientBuildManagerCallback.cs
- OracleRowUpdatedEventArgs.cs
- DateTimeStorage.cs
- FormatConvertedBitmap.cs
- BitmapEffectGeneralTransform.cs
- ThrowHelper.cs
- PenContext.cs
- Utilities.cs
- WindowsIdentity.cs
- TextRangeSerialization.cs
- WorkflowOperationBehavior.cs
- EditorAttribute.cs
- Vector3D.cs
- NeutralResourcesLanguageAttribute.cs
- TransactionScopeDesigner.cs
- GreenMethods.cs
- WorkerRequest.cs
- MemberMaps.cs
- HtmlShim.cs
- CustomAttribute.cs