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
- XmlDataSource.cs
- WebFormsRootDesigner.cs
- DockPanel.cs
- ScrollBarAutomationPeer.cs
- TextSelectionHelper.cs
- XPathDocumentNavigator.cs
- AutoGeneratedFieldProperties.cs
- TreeNodeClickEventArgs.cs
- PhonemeEventArgs.cs
- TdsValueSetter.cs
- OdbcCommand.cs
- PriorityBinding.cs
- Visual3D.cs
- DoWorkEventArgs.cs
- WindowClosedEventArgs.cs
- TraceHwndHost.cs
- MergeFailedEvent.cs
- Focus.cs
- FormViewAutoFormat.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- ConstraintConverter.cs
- NullEntityWrapper.cs
- WebScriptClientGenerator.cs
- SymLanguageType.cs
- PageCache.cs
- diagnosticsswitches.cs
- TableStyle.cs
- FixedSOMTextRun.cs
- CachedFontFace.cs
- Point.cs
- XmlElement.cs
- RuntimeEnvironment.cs
- ConfigurationPropertyAttribute.cs
- Wildcard.cs
- WsdlInspector.cs
- ComponentCollection.cs
- UnauthorizedWebPart.cs
- WebBrowserPermission.cs
- TopClause.cs
- DataSourceHelper.cs
- UmAlQuraCalendar.cs
- EntityContainer.cs
- EntityViewContainer.cs
- AspProxy.cs
- InputLanguageSource.cs
- InstanceCreationEditor.cs
- DeleteHelper.cs
- WebPartDescriptionCollection.cs
- ConfigurationSection.cs
- CatchDesigner.xaml.cs
- HttpGetProtocolReflector.cs
- TreeNodeClickEventArgs.cs
- basevalidator.cs
- NullableIntMinMaxAggregationOperator.cs
- GridViewDesigner.cs
- TableLayoutRowStyleCollection.cs
- FunctionNode.cs
- PersonalizationStateInfo.cs
- DataGridLengthConverter.cs
- LassoHelper.cs
- DesignerDataConnection.cs
- ContainerCodeDomSerializer.cs
- TextEffectCollection.cs
- TransactionFilter.cs
- SoapReflectionImporter.cs
- SocketPermission.cs
- TypeToken.cs
- DynamicControl.cs
- ObjectQuery_EntitySqlExtensions.cs
- BufferModesCollection.cs
- XmlProcessingInstruction.cs
- PEFileEvidenceFactory.cs
- TypedAsyncResult.cs
- AccessText.cs
- EdmProperty.cs
- PassportPrincipal.cs
- SmtpAuthenticationManager.cs
- SessionEndingCancelEventArgs.cs
- ComboBox.cs
- BitmapEffectDrawingContent.cs
- keycontainerpermission.cs
- DocumentsTrace.cs
- TypeElement.cs
- HwndSubclass.cs
- dbenumerator.cs
- AutoScrollExpandMessageFilter.cs
- WindowsToolbarAsMenu.cs
- ParameterToken.cs
- GridPattern.cs
- User.cs
- DataChangedEventManager.cs
- ProcessThread.cs
- MenuItemBinding.cs
- FixedDocumentSequencePaginator.cs
- OleDbSchemaGuid.cs
- BitmapInitialize.cs
- ToolbarAUtomationPeer.cs
- StorageEntityTypeMapping.cs
- TextParaClient.cs
- FigureParagraph.cs