Code:
/ DotNET / DotNET / 8.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
- JsonMessageEncoderFactory.cs
- GeneralTransform3DTo2D.cs
- RuleCache.cs
- ConnectionPoolManager.cs
- codemethodreferenceexpression.cs
- ZipIOLocalFileHeader.cs
- DecimalKeyFrameCollection.cs
- EntityKey.cs
- WebPartConnectionsCancelVerb.cs
- XmlChildNodes.cs
- StatusBar.cs
- HtmlHistory.cs
- OleDbWrapper.cs
- Model3D.cs
- AddressHeaderCollection.cs
- _SecureChannel.cs
- InternalBufferOverflowException.cs
- ScriptResourceInfo.cs
- Misc.cs
- EntityTypeBase.cs
- TransformGroup.cs
- GridEntryCollection.cs
- BaseParser.cs
- CollectionBuilder.cs
- MultiBindingExpression.cs
- NamespaceTable.cs
- SystemInformation.cs
- GridViewCellAutomationPeer.cs
- assemblycache.cs
- XmlWrappingWriter.cs
- StringValidatorAttribute.cs
- NonceToken.cs
- WindowHideOrCloseTracker.cs
- LogLogRecordEnumerator.cs
- StorageScalarPropertyMapping.cs
- AdapterUtil.cs
- ResourceDisplayNameAttribute.cs
- MdiWindowListStrip.cs
- PlatformNotSupportedException.cs
- SymbolEqualComparer.cs
- XPathMultyIterator.cs
- UIElementIsland.cs
- XpsException.cs
- ServiceHostingEnvironment.cs
- RegistryKey.cs
- PerformanceCounterPermissionEntry.cs
- IndexedGlyphRun.cs
- InstanceNormalEvent.cs
- Context.cs
- DesignerActionMethodItem.cs
- WorkflowPrinting.cs
- PartialCachingControl.cs
- ObjectSecurityT.cs
- httpserverutility.cs
- FieldAccessException.cs
- RuleAttributes.cs
- _BaseOverlappedAsyncResult.cs
- KnownTypesProvider.cs
- RsaKeyIdentifierClause.cs
- FormsAuthenticationCredentials.cs
- ItemsPresenter.cs
- HtmlShimManager.cs
- validationstate.cs
- ContentValidator.cs
- XhtmlConformanceSection.cs
- QueryResponse.cs
- SiteMapDataSourceView.cs
- BooleanToVisibilityConverter.cs
- SingleQueryOperator.cs
- FontInfo.cs
- OleDbWrapper.cs
- ColorTransform.cs
- SafeHandle.cs
- XmlRawWriterWrapper.cs
- InstalledFontCollection.cs
- HttpModuleCollection.cs
- WmpBitmapDecoder.cs
- OracleBFile.cs
- ObjectDisposedException.cs
- BasicKeyConstraint.cs
- RangeBase.cs
- ReplacementText.cs
- ConversionContext.cs
- StructuralCache.cs
- Buffer.cs
- AuthenticationModuleElementCollection.cs
- EntryWrittenEventArgs.cs
- SoapReflectionImporter.cs
- ImpersonateTokenRef.cs
- InvokeMethodActivityDesigner.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- Memoizer.cs
- BinaryConverter.cs
- MetricEntry.cs
- InputLanguageProfileNotifySink.cs
- XmlObjectSerializer.cs
- DirectoryRootQuery.cs
- DocumentPageHost.cs
- ObjectStateEntry.cs
- TextPattern.cs