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
- XmlCountingReader.cs
- SQLUtility.cs
- DateTimePicker.cs
- AndMessageFilterTable.cs
- StorageEntityTypeMapping.cs
- ValueUtilsSmi.cs
- HelpHtmlBuilder.cs
- NullableFloatMinMaxAggregationOperator.cs
- DataControlFieldCell.cs
- NavigateEvent.cs
- CacheAxisQuery.cs
- XmlSchemaDocumentation.cs
- COM2Properties.cs
- PagedControl.cs
- ChangeBlockUndoRecord.cs
- ExpressionNode.cs
- ChtmlTextWriter.cs
- DataServiceRequest.cs
- HtmlInputText.cs
- BrushMappingModeValidation.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- X509RawDataKeyIdentifierClause.cs
- DelegateHelpers.Generated.cs
- SqlNodeTypeOperators.cs
- MasterPage.cs
- CriticalHandle.cs
- PropertyEmitter.cs
- CharacterShapingProperties.cs
- CookieHandler.cs
- BorderGapMaskConverter.cs
- DrawingVisual.cs
- LogicalTreeHelper.cs
- ExceptionUtility.cs
- WinFormsSpinner.cs
- SqlMultiplexer.cs
- HashCryptoHandle.cs
- TreeViewImageIndexConverter.cs
- Style.cs
- DoubleStorage.cs
- __ComObject.cs
- InstanceNameConverter.cs
- ZoneButton.cs
- ToolStripItemRenderEventArgs.cs
- LinqDataSourceStatusEventArgs.cs
- SoapSchemaExporter.cs
- ColorAnimationUsingKeyFrames.cs
- StyleBamlTreeBuilder.cs
- ResetableIterator.cs
- RelationshipConverter.cs
- TabControlAutomationPeer.cs
- RectAnimationClockResource.cs
- MappedMetaModel.cs
- Label.cs
- ApplicationProxyInternal.cs
- LayoutUtils.cs
- ManagementObjectSearcher.cs
- DataTransferEventArgs.cs
- SqlRecordBuffer.cs
- PagedDataSource.cs
- InstallerTypeAttribute.cs
- SoapConverter.cs
- TextSegment.cs
- XsltLibrary.cs
- SmiContextFactory.cs
- DispatcherExceptionEventArgs.cs
- IISUnsafeMethods.cs
- IgnorePropertiesAttribute.cs
- SynchronizedDispatch.cs
- SspiHelper.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- HtmlHead.cs
- CatalogPart.cs
- StorageComplexPropertyMapping.cs
- OleDbConnectionInternal.cs
- HelpKeywordAttribute.cs
- ReadWriteControlDesigner.cs
- MetadataArtifactLoaderFile.cs
- LayoutExceptionEventArgs.cs
- Choices.cs
- SystemUnicastIPAddressInformation.cs
- CallTemplateAction.cs
- SessionSwitchEventArgs.cs
- TripleDESCryptoServiceProvider.cs
- infer.cs
- SslStreamSecurityUpgradeProvider.cs
- EditingCommands.cs
- WebPartDescription.cs
- Privilege.cs
- SafeNativeMethodsMilCoreApi.cs
- MethodAccessException.cs
- NamespaceInfo.cs
- COM2TypeInfoProcessor.cs
- BooleanExpr.cs
- DragCompletedEventArgs.cs
- InlineCollection.cs
- CompiledQueryCacheKey.cs
- XmlSchemaExporter.cs
- ScriptManagerProxy.cs
- MenuItem.cs
- ListViewItem.cs