Code:
/ FX-1434 / FX-1434 / 1.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
- AliasedSlot.cs
- PostBackOptions.cs
- UnmanagedHandle.cs
- MultiBindingExpression.cs
- ToolStripDropDownButton.cs
- RuleEngine.cs
- GeometryGroup.cs
- KnowledgeBase.cs
- StringValueConverter.cs
- _NegotiateClient.cs
- ActivityFunc.cs
- IRCollection.cs
- TransformedBitmap.cs
- SerialErrors.cs
- SecurityPolicySection.cs
- OpenFileDialog.cs
- StreamGeometryContext.cs
- ItemDragEvent.cs
- RSAProtectedConfigurationProvider.cs
- NotFiniteNumberException.cs
- GenericXmlSecurityToken.cs
- MutexSecurity.cs
- InheritablePropertyChangeInfo.cs
- XpsS0ValidatingLoader.cs
- OleDbException.cs
- KeyValuePair.cs
- UniqueSet.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- EventSinkHelperWriter.cs
- BamlStream.cs
- TypeDependencyAttribute.cs
- LambdaCompiler.ControlFlow.cs
- ExpressionParser.cs
- QueryPageSettingsEventArgs.cs
- StaticDataManager.cs
- PenContexts.cs
- RowToParametersTransformer.cs
- TextEffect.cs
- ComponentResourceKeyConverter.cs
- SplitContainer.cs
- XmlSchemaAttributeGroup.cs
- DynamicDataManager.cs
- FileLevelControlBuilderAttribute.cs
- WebPartConnectionsConnectVerb.cs
- SiteMapSection.cs
- ResourceDisplayNameAttribute.cs
- FragmentQueryProcessor.cs
- TextOptionsInternal.cs
- DiagnosticsElement.cs
- MailDefinition.cs
- StreamWriter.cs
- CommandLibraryHelper.cs
- AuthenticationModulesSection.cs
- NotificationContext.cs
- ServiceOperationInvoker.cs
- WorkerProcess.cs
- XmlSerializerSection.cs
- StylusTip.cs
- CalendarDay.cs
- _LazyAsyncResult.cs
- EventProviderWriter.cs
- StateChangeEvent.cs
- PrintPreviewGraphics.cs
- DesignerAttribute.cs
- ValidationEventArgs.cs
- PrintPreviewControl.cs
- DesignerValidationSummaryAdapter.cs
- TreeIterator.cs
- ServiceObjectContainer.cs
- WebPartChrome.cs
- PopupEventArgs.cs
- PrintEvent.cs
- PhysicalOps.cs
- recordstate.cs
- DefinitionUpdate.cs
- InputProcessorProfilesLoader.cs
- SecurityCriticalDataForSet.cs
- ListControl.cs
- SafeNativeMethodsOther.cs
- CodeDOMProvider.cs
- InstanceDataCollection.cs
- ThreadInterruptedException.cs
- ConnectionOrientedTransportBindingElement.cs
- BitmapEncoder.cs
- ResourceExpressionEditor.cs
- XmlSerializableReader.cs
- SoapTransportImporter.cs
- CodePageUtils.cs
- ContextMenuService.cs
- SqlBinder.cs
- WebPartDisplayModeCancelEventArgs.cs
- MultiPartWriter.cs
- ZoneButton.cs
- WindowsGraphicsWrapper.cs
- XpsFixedPageReaderWriter.cs
- SizeAnimationUsingKeyFrames.cs
- ProtocolsSection.cs
- ValidationError.cs
- X509RecipientCertificateServiceElement.cs
- Assert.cs