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
- XPathAncestorQuery.cs
- DispatcherHookEventArgs.cs
- OracleParameter.cs
- DefaultValueAttribute.cs
- SQLConvert.cs
- WorkflowTransactionOptions.cs
- TimeSpan.cs
- State.cs
- Button.cs
- TableDetailsRow.cs
- SafeNativeMethods.cs
- HtmlForm.cs
- ConfigXmlElement.cs
- FontFamilyValueSerializer.cs
- ArcSegment.cs
- DesignerActionVerbList.cs
- TextClipboardData.cs
- UnsupportedPolicyOptionsException.cs
- LabelAutomationPeer.cs
- ThaiBuddhistCalendar.cs
- RegionData.cs
- VersionedStreamOwner.cs
- OptionalColumn.cs
- Monitor.cs
- ExcludePathInfo.cs
- coordinator.cs
- MappingSource.cs
- SystemTcpStatistics.cs
- DateTimeParse.cs
- SiteMapNodeItemEventArgs.cs
- WindowsListBox.cs
- AssemblyCache.cs
- XmlAnyElementAttribute.cs
- DataMemberFieldEditor.cs
- RSAPKCS1KeyExchangeFormatter.cs
- TrustManagerMoreInformation.cs
- DefaultBindingPropertyAttribute.cs
- TreeViewImageKeyConverter.cs
- GridViewCommandEventArgs.cs
- CacheSection.cs
- RepeatButtonAutomationPeer.cs
- GenericsInstances.cs
- BitmapSource.cs
- ContentPlaceHolder.cs
- WpfKnownType.cs
- HuffmanTree.cs
- SafeHandles.cs
- CodeBinaryOperatorExpression.cs
- SimpleBitVector32.cs
- ExpressionNode.cs
- SourceFileBuildProvider.cs
- PublisherMembershipCondition.cs
- FlowDocumentPaginator.cs
- FileClassifier.cs
- UserPersonalizationStateInfo.cs
- ColumnTypeConverter.cs
- ByteBufferPool.cs
- ParseNumbers.cs
- EntityDataSourceWrapperCollection.cs
- ForEach.cs
- Encoder.cs
- CacheAxisQuery.cs
- ImageCodecInfoPrivate.cs
- RtfFormatStack.cs
- ToolStripItemTextRenderEventArgs.cs
- URLIdentityPermission.cs
- ZipIOExtraFieldElement.cs
- EntityDataSourceUtil.cs
- EventLogPermissionEntry.cs
- ChildChangedEventArgs.cs
- StrokeNodeEnumerator.cs
- HttpListenerRequest.cs
- FrameworkContextData.cs
- AnnotationHighlightLayer.cs
- WindowsFormsHelpers.cs
- NavigationFailedEventArgs.cs
- SchemaNames.cs
- QuaternionValueSerializer.cs
- TextEditorDragDrop.cs
- DefaultSection.cs
- ConfigurationElementCollection.cs
- SqlInfoMessageEvent.cs
- ExpressionDumper.cs
- Int32Rect.cs
- XpsColorContext.cs
- NumberAction.cs
- PenThread.cs
- VisualStyleRenderer.cs
- ViewStateAttachedPropertyFeature.cs
- RadioButtonFlatAdapter.cs
- LinearQuaternionKeyFrame.cs
- PartitionResolver.cs
- HybridDictionary.cs
- StrongNameIdentityPermission.cs
- SqlBuilder.cs
- CqlWriter.cs
- ZoomPercentageConverter.cs
- HttpCapabilitiesSectionHandler.cs
- LineBreak.cs
- PlatformCulture.cs