Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / DataGridViewComponentPropertyGridSite.cs / 1 / DataGridViewComponentPropertyGridSite.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Windows.Forms.Design {
using System;
using System.Design;
using System.CodeDom;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Diagnostics;
using System.Reflection;
using System.Windows.Forms;
internal class DataGridViewComponentPropertyGridSite : ISite {
private IServiceProvider sp;
private IComponent comp;
private bool inGetService = false;
public DataGridViewComponentPropertyGridSite(IServiceProvider sp, IComponent comp) {
this.sp = sp;
this.comp = comp;
}
/** The component sited by this component site. */
///
///
/// When implemented by a class, gets the component associated with the .
///
public IComponent Component {get {return comp;}}
/** The container in which the component is sited. */
///
///
/// When implemented by a class, gets the container associated with the .
///
public IContainer Container {get {return null;}}
/** Indicates whether the component is in design mode. */
///
///
/// When implemented by a class, determines whether the component is in design mode.
///
public bool DesignMode {get {return false;}}
/**
* The name of the component.
*/
///
///
/// When implemented by a class, gets or sets the name of
/// the component associated with the .
///
public String Name {
get {return null;}
set {}
}
public object GetService(Type t) {
if (!inGetService && sp != null) {
try {
inGetService = true;
return sp.GetService(t);
}
finally {
inGetService = false;
}
}
return null;
}
}
}
// 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
- indexingfiltermarshaler.cs
- MenuCommand.cs
- sqlcontext.cs
- TreeNodeCollection.cs
- FormViewCommandEventArgs.cs
- Marshal.cs
- SchemaMapping.cs
- TypeRefElement.cs
- AnonymousIdentificationModule.cs
- XmlEnumAttribute.cs
- TagPrefixAttribute.cs
- DetailsViewModeEventArgs.cs
- ImageSourceValueSerializer.cs
- Number.cs
- BamlVersionHeader.cs
- Boolean.cs
- EllipseGeometry.cs
- TextViewBase.cs
- DbParameterCollectionHelper.cs
- Rotation3D.cs
- SafeCancelMibChangeNotify.cs
- WebExceptionStatus.cs
- VectorValueSerializer.cs
- ConfigXmlDocument.cs
- NativeObjectSecurity.cs
- ContainerSelectorGlyph.cs
- UnsafeNativeMethods.cs
- ReliableInputConnection.cs
- GridViewHeaderRowPresenter.cs
- GeneralTransform3D.cs
- COAUTHIDENTITY.cs
- AbstractDataSvcMapFileLoader.cs
- VoiceInfo.cs
- FrameworkName.cs
- DataProtection.cs
- XmlReflectionMember.cs
- ColumnMapCopier.cs
- TdsParserStateObject.cs
- ObjectNavigationPropertyMapping.cs
- CodeParameterDeclarationExpression.cs
- UpdatePanelControlTrigger.cs
- StrongTypingException.cs
- RenderData.cs
- StringReader.cs
- XmlAnyElementAttributes.cs
- ChannelSinkStacks.cs
- HostingEnvironmentWrapper.cs
- InternalConfigRoot.cs
- HostedImpersonationContext.cs
- TextSelectionHighlightLayer.cs
- SimplePropertyEntry.cs
- TypeLoadException.cs
- XmlReader.cs
- ElapsedEventArgs.cs
- InfocardClientCredentials.cs
- CompilerParameters.cs
- EntityCommand.cs
- AppDomain.cs
- EndpointDiscoveryMetadata.cs
- FixedSOMTableCell.cs
- SqlDataRecord.cs
- ActiveXMessageFormatter.cs
- SelectorAutomationPeer.cs
- Pair.cs
- ColumnMap.cs
- ProcessHostConfigUtils.cs
- NullableConverter.cs
- FileNotFoundException.cs
- ObjectTag.cs
- ContextItem.cs
- TemplatingOptionsDialog.cs
- RecommendedAsConfigurableAttribute.cs
- XmlAnyElementAttributes.cs
- ReflectionUtil.cs
- OdbcConnectionStringbuilder.cs
- PersonalizableTypeEntry.cs
- PerformanceCounterCategory.cs
- ExtenderHelpers.cs
- ISAPIRuntime.cs
- CodeFieldReferenceExpression.cs
- OdbcHandle.cs
- printdlgexmarshaler.cs
- CardSpaceException.cs
- Animatable.cs
- Timer.cs
- MemoryMappedFile.cs
- StrongNameHelpers.cs
- SettingsBindableAttribute.cs
- _ShellExpression.cs
- _WinHttpWebProxyDataBuilder.cs
- EntityDataSourceConfigureObjectContext.cs
- ISAPIApplicationHost.cs
- Marshal.cs
- DataColumnMappingCollection.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- TypefaceMap.cs
- DbMetaDataColumnNames.cs
- KeyManager.cs
- SoapMessage.cs
- ImageEditor.cs