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
- ContentFileHelper.cs
- HtmlControlPersistable.cs
- SpotLight.cs
- EventSetter.cs
- ItemsControl.cs
- AuthenticateEventArgs.cs
- InvokeMethodActivityDesigner.cs
- EntityDataSourceStatementEditorForm.cs
- SaveFileDialog.cs
- RegularExpressionValidator.cs
- EdmEntityTypeAttribute.cs
- Configuration.cs
- ToggleButtonAutomationPeer.cs
- LassoSelectionBehavior.cs
- PatternMatcher.cs
- SelectingProviderEventArgs.cs
- WindowInteractionStateTracker.cs
- BamlStream.cs
- SafeRightsManagementQueryHandle.cs
- CompatibleComparer.cs
- ReachNamespaceInfo.cs
- FixedSOMTable.cs
- WebBrowserEvent.cs
- BinaryHeap.cs
- DebugTracing.cs
- SqlResolver.cs
- MDIClient.cs
- CriticalFinalizerObject.cs
- SettingsPropertyIsReadOnlyException.cs
- DataReaderContainer.cs
- WCFBuildProvider.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- ComponentDispatcher.cs
- EmbeddedMailObjectsCollection.cs
- HtmlInputHidden.cs
- StoreAnnotationsMap.cs
- RMEnrollmentPage3.cs
- GridErrorDlg.cs
- RuntimeConfigLKG.cs
- ValidatorCollection.cs
- future.cs
- GraphicsContainer.cs
- Msmq4PoisonHandler.cs
- BatchWriter.cs
- ProcessHostServerConfig.cs
- Renderer.cs
- DocumentSequence.cs
- DetailsViewCommandEventArgs.cs
- PowerModeChangedEventArgs.cs
- XmlLinkedNode.cs
- VectorConverter.cs
- ProgressChangedEventArgs.cs
- ConstraintCollection.cs
- MasterPageParser.cs
- SoapUnknownHeader.cs
- XPathNode.cs
- PenThreadWorker.cs
- HtmlContainerControl.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SQLBinaryStorage.cs
- HtmlButton.cs
- FontWeights.cs
- TextOutput.cs
- NameValueConfigurationCollection.cs
- WaveHeader.cs
- NetDispatcherFaultException.cs
- PageWrapper.cs
- MsmqIntegrationProcessProtocolHandler.cs
- DependencyObject.cs
- SafeHandle.cs
- PeerMessageDispatcher.cs
- DesignerDataSourceView.cs
- TemplateControl.cs
- Cursor.cs
- DataGridViewElement.cs
- CommonDialog.cs
- parserscommon.cs
- RadioButtonFlatAdapter.cs
- LogLogRecord.cs
- bindurihelper.cs
- XmlCodeExporter.cs
- XPathSelectionIterator.cs
- ImageSource.cs
- ProcessHost.cs
- ToolboxDataAttribute.cs
- HttpServerChannel.cs
- SqlTriggerAttribute.cs
- Vector3DAnimation.cs
- Page.cs
- SystemWebExtensionsSectionGroup.cs
- XmlAnyElementAttributes.cs
- RawTextInputReport.cs
- ConfigXmlText.cs
- FileCodeGroup.cs
- LineGeometry.cs
- TryExpression.cs
- SQLConvert.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- MessageHeaders.cs
- SocketPermission.cs