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
- TextElementEnumerator.cs
- PolyBezierSegment.cs
- CacheForPrimitiveTypes.cs
- XhtmlBasicTextBoxAdapter.cs
- PropertyManager.cs
- SRef.cs
- OracleCommandSet.cs
- FixedPage.cs
- ReadOnlyDictionary.cs
- InheritanceContextChangedEventManager.cs
- XmlAnyElementAttribute.cs
- UpdateDelegates.Generated.cs
- HttpBufferlessInputStream.cs
- SamlAttribute.cs
- XmlFormatExtensionPointAttribute.cs
- ControlAdapter.cs
- FtpWebRequest.cs
- BoolExpressionVisitors.cs
- AssemblyHash.cs
- OdbcConnectionPoolProviderInfo.cs
- User.cs
- Transform3DGroup.cs
- MultiAsyncResult.cs
- Accessible.cs
- Properties.cs
- TypographyProperties.cs
- ListViewTableCell.cs
- Bits.cs
- KoreanCalendar.cs
- TableLayoutSettingsTypeConverter.cs
- FormsAuthenticationUser.cs
- SymLanguageType.cs
- MetadataCollection.cs
- ApplicationSecurityInfo.cs
- PasswordBox.cs
- XmlDocumentSurrogate.cs
- SamlSecurityToken.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- SQLSingle.cs
- TriggerAction.cs
- ArrayWithOffset.cs
- ListParagraph.cs
- FormViewModeEventArgs.cs
- AttributeCollection.cs
- ReflectionUtil.cs
- TypefaceCollection.cs
- WorkflowServiceHost.cs
- LoaderAllocator.cs
- GridViewColumnCollection.cs
- TimeSpanOrInfiniteConverter.cs
- QilChoice.cs
- AccessKeyManager.cs
- ProvidePropertyAttribute.cs
- StylusDevice.cs
- CursorInteropHelper.cs
- DockPattern.cs
- BinaryMessageFormatter.cs
- MessageBox.cs
- SqlException.cs
- PublisherMembershipCondition.cs
- XmlWellformedWriter.cs
- CodeTypeParameter.cs
- activationcontext.cs
- UTF32Encoding.cs
- OptionUsage.cs
- WeakReferenceKey.cs
- StringComparer.cs
- CharUnicodeInfo.cs
- AdornerDecorator.cs
- TimeZone.cs
- ProfilePropertySettingsCollection.cs
- SettingsBase.cs
- Menu.cs
- LinkArea.cs
- SHA384Managed.cs
- AssertHelper.cs
- MessageParameterAttribute.cs
- PropertyValue.cs
- CatalogPartCollection.cs
- GridViewHeaderRowPresenter.cs
- XPathNavigator.cs
- RelationshipDetailsCollection.cs
- WebDisplayNameAttribute.cs
- MarkupProperty.cs
- RoleGroupCollection.cs
- DesignTimeParseData.cs
- XmlSchemaDatatype.cs
- Table.cs
- CodeMethodMap.cs
- RangeValueProviderWrapper.cs
- SoapExtensionReflector.cs
- TypeUsageBuilder.cs
- ReceiveDesigner.xaml.cs
- ComMethodElement.cs
- SessionSwitchEventArgs.cs
- Control.cs
- PathData.cs
- shaperfactoryquerycacheentry.cs
- RunClient.cs
- MultiByteCodec.cs