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
- RuleSettingsCollection.cs
- SemanticKeyElement.cs
- ValueQuery.cs
- DiagnosticTraceSource.cs
- APCustomTypeDescriptor.cs
- MultipartIdentifier.cs
- IsolatedStorageFile.cs
- VisualTreeHelper.cs
- WizardDesigner.cs
- TextServicesCompartmentContext.cs
- PathFigureCollectionConverter.cs
- RsaElement.cs
- SmiContext.cs
- TextSpan.cs
- ImageBrush.cs
- IsolatedStoragePermission.cs
- ComponentCommands.cs
- RoutedUICommand.cs
- NodeCounter.cs
- EntityDataSourceDesignerHelper.cs
- CodeSnippetStatement.cs
- DurableOperationContext.cs
- DefaultTextStoreTextComposition.cs
- HighlightComponent.cs
- SqlFacetAttribute.cs
- ToolStripArrowRenderEventArgs.cs
- MatrixUtil.cs
- UntrustedRecipientException.cs
- MenuItem.cs
- HtmlTernaryTree.cs
- EntityDataSourceDataSelection.cs
- WebHttpDispatchOperationSelectorData.cs
- TableAutomationPeer.cs
- RequestDescription.cs
- ReadWriteSpinLock.cs
- JpegBitmapDecoder.cs
- SectionVisual.cs
- X509Extension.cs
- AsyncCallback.cs
- MouseGestureConverter.cs
- XPathNodeHelper.cs
- Sql8ExpressionRewriter.cs
- Geometry3D.cs
- SweepDirectionValidation.cs
- WebPartAddingEventArgs.cs
- Int16Animation.cs
- ParallelForEach.cs
- PersistenceProviderBehavior.cs
- AuthenticationService.cs
- PtsHelper.cs
- designeractionlistschangedeventargs.cs
- RecommendedAsConfigurableAttribute.cs
- CheckBox.cs
- RtfFormatStack.cs
- InternalCache.cs
- Misc.cs
- WSDualHttpSecurityMode.cs
- PageParserFilter.cs
- OdbcParameter.cs
- ControlPropertyNameConverter.cs
- DSACryptoServiceProvider.cs
- TableLayoutRowStyleCollection.cs
- TableColumnCollectionInternal.cs
- BamlResourceContent.cs
- EncryptedReference.cs
- XPathBinder.cs
- XmlUtil.cs
- TransactionInformation.cs
- DataGridHeaderBorder.cs
- SoapExtensionTypeElement.cs
- DataTableMapping.cs
- CompModHelpers.cs
- XPathSelectionIterator.cs
- BrowserCapabilitiesFactory.cs
- ProviderConnectionPoint.cs
- Byte.cs
- Point3DCollection.cs
- PatternMatchRules.cs
- FilterInvalidBodyAccessException.cs
- ResXFileRef.cs
- ItemContainerGenerator.cs
- BitmapFrameDecode.cs
- GlobalEventManager.cs
- BCryptSafeHandles.cs
- CollectionContainer.cs
- WSTrust.cs
- ValidationSettings.cs
- MenuAutomationPeer.cs
- ComplusEndpointConfigContainer.cs
- TextEffect.cs
- NamespaceInfo.cs
- PageThemeParser.cs
- FontFaceLayoutInfo.cs
- CodeTypeReferenceExpression.cs
- KeyedQueue.cs
- BamlVersionHeader.cs
- IgnoreDeviceFilterElementCollection.cs
- BlurEffect.cs
- XPathNodeList.cs
- JoinSymbol.cs