Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / DesignerAutoFormat.cs / 1 / DesignerAutoFormat.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design { using System; using System.ComponentModel.Design; using System.Drawing; using System.Web.UI; using System.Web.UI.WebControls; using Control = System.Web.UI.Control; ///public abstract class DesignerAutoFormat { private string _name; private DesignerAutoFormatStyle _style; protected DesignerAutoFormat(string name) { if ((name == null) || (name.Length == 0)) { throw new ArgumentNullException("name"); } _name = name; } /// public string Name { get { return _name; } } public DesignerAutoFormatStyle Style { get { if (_style == null) { _style = new DesignerAutoFormatStyle(); } return _style; } } /// public abstract void Apply(Control control); public virtual Control GetPreviewControl(Control runtimeControl) { IDesignerHost host = (IDesignerHost)runtimeControl.Site.GetService(typeof(IDesignerHost)); ControlDesigner designer = host.GetDesigner(runtimeControl) as ControlDesigner; if (designer != null) { return designer.CreateClonedControl(host, true); } return null; } /// public override string ToString() { return Name; } } } // 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
- InputReport.cs
- ArrangedElement.cs
- StatusBarAutomationPeer.cs
- Domain.cs
- XComponentModel.cs
- localization.cs
- SelectedGridItemChangedEvent.cs
- Quad.cs
- DesignOnlyAttribute.cs
- RepeatBehaviorConverter.cs
- ContentPosition.cs
- GeneralTransform3D.cs
- CodeSnippetExpression.cs
- WebBrowserProgressChangedEventHandler.cs
- BridgeDataReader.cs
- HybridDictionary.cs
- SchemaNotation.cs
- XmlArrayAttribute.cs
- EventMap.cs
- VBCodeProvider.cs
- SafeNativeMethods.cs
- BrowserCapabilitiesCodeGenerator.cs
- StringDictionary.cs
- SafePointer.cs
- SplayTreeNode.cs
- MsmqIntegrationChannelListener.cs
- SelectionProviderWrapper.cs
- XmlChildEnumerator.cs
- ConnectionPointGlyph.cs
- StringStorage.cs
- SmiConnection.cs
- IisTraceListener.cs
- HMACSHA256.cs
- CmsUtils.cs
- TimelineGroup.cs
- XNameConverter.cs
- ProfileService.cs
- Brush.cs
- SelectorItemAutomationPeer.cs
- Int64.cs
- OpCopier.cs
- ClientConvert.cs
- PageWrapper.cs
- SoapServerMethod.cs
- SharedUtils.cs
- CodeTypeDeclaration.cs
- ILGenerator.cs
- WebPartUtil.cs
- ProfilePropertySettingsCollection.cs
- IndexedString.cs
- XmlUrlResolver.cs
- BindingNavigator.cs
- _CacheStreams.cs
- WebUtil.cs
- CharacterBufferReference.cs
- EntityReference.cs
- BinaryFormatter.cs
- BindingBase.cs
- HScrollProperties.cs
- SubqueryRules.cs
- SqlMetaData.cs
- PolicyLevel.cs
- ListControlBoundActionList.cs
- UserThread.cs
- ImmutablePropertyDescriptorGridEntry.cs
- MsmqIntegrationBindingCollectionElement.cs
- BitmapPalette.cs
- ImportContext.cs
- SQLBinaryStorage.cs
- DashStyle.cs
- COM2EnumConverter.cs
- SchemaManager.cs
- PackagePartCollection.cs
- LinkedResource.cs
- DataBinder.cs
- FirstMatchCodeGroup.cs
- SamlConditions.cs
- WebConfigurationHostFileChange.cs
- DateTimeConverter2.cs
- InternalException.cs
- ZipIOExtraField.cs
- WebPartDescription.cs
- WebUtil.cs
- TypeBuilderInstantiation.cs
- EntityDataSourceUtil.cs
- SafeCoTaskMem.cs
- ContextMenu.cs
- StatusBar.cs
- QuaternionRotation3D.cs
- ApplicationDirectory.cs
- GroupBox.cs
- storagemappingitemcollection.viewdictionary.cs
- Query.cs
- PagesSection.cs
- Identity.cs
- TypedTableBaseExtensions.cs
- ProfileGroupSettings.cs
- CannotUnloadAppDomainException.cs
- HtmlInputSubmit.cs
- CodePrimitiveExpression.cs