Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebParts / PartDesigner.cs / 1 / PartDesigner.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls.WebParts { using System; using System.ComponentModel; using System.ComponentModel.Design; using System.Design; using System.Diagnostics; using System.Web.UI.Design; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)] public abstract class PartDesigner : CompositeControlDesigner { // Internal to prevent subclassing outside this assembly internal PartDesigner() { } protected override bool UsePreviewControl { get { return true; } } internal static Control GetViewControl(Control control) { Debug.Assert(control != null); ControlDesigner designer = GetDesigner(control); if (designer != null) { return designer.ViewControl; } else { return control; } } private static ControlDesigner GetDesigner(Control control) { Debug.Assert(control != null); ControlDesigner designer = null; ISite site = control.Site; if (site != null) { IDesignerHost host = (IDesignerHost)site.GetService(typeof(IDesignerHost)); Debug.Assert(host != null, "Did not get a valid IDesignerHost reference"); designer = host.GetDesigner(control) as ControlDesigner; } return designer; } public override void Initialize(IComponent component) { VerifyInitializeArgument(component, typeof(Part)); base.Initialize(component); } } } // 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
- AccessibilityHelperForXpWin2k3.cs
- CounterCreationData.cs
- MaskedTextBox.cs
- BindableTemplateBuilder.cs
- DynamicRenderer.cs
- PathFigureCollectionConverter.cs
- DateTimeConstantAttribute.cs
- BigInt.cs
- BufferedStream.cs
- AssertSection.cs
- DirectionalLight.cs
- AtomContentProperty.cs
- _NtlmClient.cs
- StreamInfo.cs
- MenuCommand.cs
- SaveFileDialogDesigner.cs
- Opcode.cs
- TransformPatternIdentifiers.cs
- CounterSampleCalculator.cs
- HyperLinkStyle.cs
- XmlSchemaInfo.cs
- CodeTypeConstructor.cs
- HybridDictionary.cs
- RepeatButtonAutomationPeer.cs
- StylusCollection.cs
- EndpointInstanceProvider.cs
- EmptyStringExpandableObjectConverter.cs
- ThicknessAnimation.cs
- ElementFactory.cs
- AuthenticationModuleElementCollection.cs
- AuthorizationRuleCollection.cs
- TypeDependencyAttribute.cs
- Permission.cs
- TranslateTransform.cs
- Listbox.cs
- RecipientInfo.cs
- TemplatePartAttribute.cs
- SerializationSectionGroup.cs
- ASCIIEncoding.cs
- ExceptionUtil.cs
- VariableReference.cs
- BrowserDefinitionCollection.cs
- IisTraceWebEventProvider.cs
- TraceHandler.cs
- XmlQueryCardinality.cs
- TaskDesigner.cs
- TextServicesCompartmentEventSink.cs
- HtmlInputText.cs
- ClientApiGenerator.cs
- HttpHandlerActionCollection.cs
- SmtpFailedRecipientException.cs
- ProfileInfo.cs
- SourceFileInfo.cs
- MailWriter.cs
- DirtyTextRange.cs
- ICollection.cs
- TypeConverterHelper.cs
- SingleResultAttribute.cs
- TemplatePartAttribute.cs
- WebPartChrome.cs
- PerfCounters.cs
- HierarchicalDataTemplate.cs
- ToolStripStatusLabel.cs
- SettingsPropertyCollection.cs
- ObjectDataSourceSelectingEventArgs.cs
- ScrollBar.cs
- BoolExpressionVisitors.cs
- Convert.cs
- SqlConnectionFactory.cs
- ToolStripTextBox.cs
- SmtpFailedRecipientException.cs
- CatalogZoneAutoFormat.cs
- NetStream.cs
- Msmq4SubqueuePoisonHandler.cs
- FormDocumentDesigner.cs
- x509utils.cs
- ObjectConverter.cs
- DataColumnChangeEvent.cs
- Identifier.cs
- MonitoringDescriptionAttribute.cs
- Link.cs
- BreakSafeBase.cs
- DCSafeHandle.cs
- EntityModelSchemaGenerator.cs
- EncoderReplacementFallback.cs
- Listbox.cs
- TimeManager.cs
- DefaultProxySection.cs
- XmlDataCollection.cs
- TypeUsage.cs
- ActivityInterfaces.cs
- XmlSchemaObject.cs
- MobileUserControl.cs
- UnsafeNativeMethods.cs
- StringSource.cs
- CreateSequence.cs
- StringConcat.cs
- EllipticalNodeOperations.cs
- LinearGradientBrush.cs
- ConfigDefinitionUpdates.cs