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
- HttpValueCollection.cs
- DefaultTraceListener.cs
- WebPartConnectionsEventArgs.cs
- StylusPointCollection.cs
- JavaScriptString.cs
- _TLSstream.cs
- DecodeHelper.cs
- HttpWebRequest.cs
- LocalFileSettingsProvider.cs
- ImpersonateTokenRef.cs
- ListItemConverter.cs
- SQLRoleProvider.cs
- Label.cs
- FormViewCommandEventArgs.cs
- XmlEnumAttribute.cs
- SQLGuid.cs
- ImageAutomationPeer.cs
- CodeThrowExceptionStatement.cs
- DataGridSortCommandEventArgs.cs
- TypeConverterMarkupExtension.cs
- AssociationSet.cs
- CheckBoxAutomationPeer.cs
- SerializerProvider.cs
- SelectedDatesCollection.cs
- AxImporter.cs
- TypeReference.cs
- EndpointInstanceProvider.cs
- MenuStrip.cs
- PageRanges.cs
- CodeParameterDeclarationExpression.cs
- SafeEventHandle.cs
- IconBitmapDecoder.cs
- ComponentEditorPage.cs
- SoapCodeExporter.cs
- IndentedTextWriter.cs
- TextRenderer.cs
- DynamicPropertyReader.cs
- CodeSubDirectoriesCollection.cs
- SmiGettersStream.cs
- XmlILConstructAnalyzer.cs
- DiffuseMaterial.cs
- HitTestFilterBehavior.cs
- selecteditemcollection.cs
- DependencyPropertyAttribute.cs
- ResizingMessageFilter.cs
- ApplicationFileParser.cs
- EventManager.cs
- Quaternion.cs
- SkipStoryboardToFill.cs
- StyleCollection.cs
- safePerfProviderHandle.cs
- UpDownEvent.cs
- CompiledXpathExpr.cs
- DBSqlParserColumnCollection.cs
- FormViewInsertedEventArgs.cs
- VideoDrawing.cs
- PreProcessInputEventArgs.cs
- BamlResourceDeserializer.cs
- CssStyleCollection.cs
- SchemaConstraints.cs
- EntityDataSourceChangedEventArgs.cs
- GeneralTransformGroup.cs
- FontWeightConverter.cs
- NavigateEvent.cs
- PrintPageEvent.cs
- EventLogEntry.cs
- FormatterServices.cs
- DataGridViewComboBoxEditingControl.cs
- KoreanLunisolarCalendar.cs
- WindowsListViewGroup.cs
- FontStyleConverter.cs
- DataIdProcessor.cs
- InputBuffer.cs
- StylusPointPropertyInfo.cs
- _NegoStream.cs
- IUnknownConstantAttribute.cs
- DiscoveryReference.cs
- DbConnectionOptions.cs
- BamlRecordHelper.cs
- Stylus.cs
- XmlAttributeCollection.cs
- Int64KeyFrameCollection.cs
- MemberJoinTreeNode.cs
- ListItemCollection.cs
- XslTransform.cs
- LabelEditEvent.cs
- PolicyUnit.cs
- EntityStoreSchemaFilterEntry.cs
- autovalidator.cs
- OdbcDataReader.cs
- CodeSubDirectoriesCollection.cs
- Light.cs
- ConstraintCollection.cs
- DataObjectAttribute.cs
- JoinTreeNode.cs
- SizeFConverter.cs
- FrameworkElement.cs
- ZipFileInfoCollection.cs
- CodeMemberEvent.cs
- TreeViewHitTestInfo.cs