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
- WmlLiteralTextAdapter.cs
- XmlSerializer.cs
- ListDictionary.cs
- ZipArchive.cs
- FaultException.cs
- EncryptedXml.cs
- GridViewDesigner.cs
- HwndPanningFeedback.cs
- NativeMethods.cs
- SqlConnection.cs
- FacetEnabledSchemaElement.cs
- Mutex.cs
- SubMenuStyleCollection.cs
- SessionStateItemCollection.cs
- AtomicFile.cs
- ColumnReorderedEventArgs.cs
- IssuedSecurityTokenParameters.cs
- ClientConfigurationSystem.cs
- Hyperlink.cs
- SettingsPropertyIsReadOnlyException.cs
- PatternMatcher.cs
- JobDuplex.cs
- XamlPoint3DCollectionSerializer.cs
- Clipboard.cs
- ShapingEngine.cs
- ConcurrentQueue.cs
- GridViewRowPresenterBase.cs
- TemplateField.cs
- VarRefManager.cs
- KeyConverter.cs
- ExpressionTable.cs
- SecurityCriticalDataForSet.cs
- TemplateColumn.cs
- CodeCatchClause.cs
- ModuleBuilder.cs
- PowerModeChangedEventArgs.cs
- ContentElement.cs
- AliasGenerator.cs
- DataViewManagerListItemTypeDescriptor.cs
- EncoderFallback.cs
- _Semaphore.cs
- HtmlGenericControl.cs
- DefaultPrintController.cs
- EDesignUtil.cs
- Int16AnimationBase.cs
- Encoding.cs
- AdapterUtil.cs
- Subset.cs
- StateChangeEvent.cs
- MonitorWrapper.cs
- Label.cs
- OutOfMemoryException.cs
- MsmqMessageProperty.cs
- ColorConvertedBitmap.cs
- BrowserDefinition.cs
- NumberAction.cs
- InvokeSchedule.cs
- Set.cs
- ExpressionBuilder.cs
- DomainUpDown.cs
- RemoteWebConfigurationHost.cs
- WriteTimeStream.cs
- DateTimeConverter.cs
- Repeater.cs
- PropertyGridEditorPart.cs
- VersionPair.cs
- LinqDataSourceValidationException.cs
- DataGridDetailsPresenter.cs
- UnsafeNativeMethods.cs
- SourceFileInfo.cs
- SplineKeyFrames.cs
- InvalidComObjectException.cs
- XmlTextReaderImpl.cs
- PasswordRecoveryDesigner.cs
- DisposableCollectionWrapper.cs
- ArraySet.cs
- XmlDocument.cs
- HostingEnvironmentException.cs
- XmlEntity.cs
- SoapSchemaExporter.cs
- ObjectSet.cs
- smtpconnection.cs
- Camera.cs
- BuilderInfo.cs
- InvalidAsynchronousStateException.cs
- RepeatBehavior.cs
- ClipboardProcessor.cs
- SmtpSection.cs
- SystemTcpConnection.cs
- SmiContext.cs
- FillBehavior.cs
- DateTimeConverter2.cs
- Crc32.cs
- _IPv4Address.cs
- NonVisualControlAttribute.cs
- WeakReferenceList.cs
- _AuthenticationState.cs
- ContextMenu.cs
- DataServiceException.cs
- COAUTHINFO.cs