Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / TypeDescriptorContext.cs / 1 / TypeDescriptorContext.cs
using System; using System.ComponentModel; using System.ComponentModel.Design; namespace System.Web.UI.Design.WebControls { internal sealed class TypeDescriptorContext : ITypeDescriptorContext{ private IDesignerHost _designerHost; private PropertyDescriptor _propDesc; private object _instance; public TypeDescriptorContext(IDesignerHost designerHost, PropertyDescriptor propDesc, object instance) { _designerHost = designerHost; _propDesc = propDesc; _instance = instance; } private IComponentChangeService ComponentChangeService { get { return (IComponentChangeService)_designerHost.GetService(typeof(IComponentChangeService)); } } public IContainer Container { get { return (IContainer)_designerHost.GetService(typeof(IContainer)); } } public object Instance { get { return _instance; } } public PropertyDescriptor PropertyDescriptor { get { return _propDesc; } } public object GetService(Type serviceType) { return _designerHost.GetService(serviceType); } public bool OnComponentChanging() { if (ComponentChangeService != null) { try { ComponentChangeService.OnComponentChanging(_instance, _propDesc); } catch (CheckoutException ce) { if (ce == CheckoutException.Canceled) { return false; } throw ce; } } return true; } public void OnComponentChanged() { if (ComponentChangeService != null) { ComponentChangeService.OnComponentChanged(_instance, _propDesc, null, 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
- ComponentCollection.cs
- AmbientLight.cs
- FormView.cs
- FileInfo.cs
- MissingMethodException.cs
- LayoutTableCell.cs
- CheckedPointers.cs
- Calendar.cs
- InitializationEventAttribute.cs
- HitTestParameters3D.cs
- JavaScriptObjectDeserializer.cs
- ApplyImportsAction.cs
- XhtmlBasicPageAdapter.cs
- FormsAuthenticationUserCollection.cs
- DecimalAnimation.cs
- StringResourceManager.cs
- Style.cs
- AsyncContentLoadedEventArgs.cs
- GlyphShapingProperties.cs
- DataBindingExpressionBuilder.cs
- ReadOnlyPropertyMetadata.cs
- XPathChildIterator.cs
- PerspectiveCamera.cs
- FieldNameLookup.cs
- COM2ExtendedUITypeEditor.cs
- FutureFactory.cs
- ItemType.cs
- EnumerableCollectionView.cs
- ViewUtilities.cs
- CallSiteHelpers.cs
- DeferredSelectedIndexReference.cs
- DateTimeParse.cs
- UdpDiscoveryEndpointProvider.cs
- SigningProgress.cs
- CatalogZoneAutoFormat.cs
- ObfuscateAssemblyAttribute.cs
- ColumnTypeConverter.cs
- TableParaClient.cs
- HtmlFormAdapter.cs
- WorkflowExecutor.cs
- EntityDataSource.cs
- PnrpPermission.cs
- CompilationUnit.cs
- SizeAnimationClockResource.cs
- BindingContext.cs
- ThaiBuddhistCalendar.cs
- BindingListCollectionView.cs
- ParentControlDesigner.cs
- CachedBitmap.cs
- LogConverter.cs
- BinaryNode.cs
- TraceContextEventArgs.cs
- OdbcDataAdapter.cs
- RijndaelCryptoServiceProvider.cs
- DelegatedStream.cs
- Byte.cs
- DoubleLinkListEnumerator.cs
- PowerModeChangedEventArgs.cs
- SchemaObjectWriter.cs
- NamespaceQuery.cs
- TextParagraphView.cs
- OutputScopeManager.cs
- CachedFontFace.cs
- IgnoreFileBuildProvider.cs
- EventSchemaTraceListener.cs
- WebHttpElement.cs
- TextSelectionHighlightLayer.cs
- XmlSchemaComplexContent.cs
- HttpDigestClientCredential.cs
- NameValuePair.cs
- WebPartEditorCancelVerb.cs
- ThemeableAttribute.cs
- DataControlCommands.cs
- PointLightBase.cs
- ProofTokenCryptoHandle.cs
- MessageFilterTable.cs
- ImageMapEventArgs.cs
- ProcessHostServerConfig.cs
- AdRotator.cs
- FixedSOMSemanticBox.cs
- CompareInfo.cs
- Win32Native.cs
- SignatureHelper.cs
- XmlWriterTraceListener.cs
- DataBindingExpressionBuilder.cs
- XamlTemplateSerializer.cs
- MappedMetaModel.cs
- UserControl.cs
- EventKeyword.cs
- IndentTextWriter.cs
- ProcessRequestArgs.cs
- TargetPerspective.cs
- BamlLocalizabilityResolver.cs
- TreeNodeCollectionEditor.cs
- HorizontalAlignConverter.cs
- SystemSounds.cs
- LOSFormatter.cs
- TimeZone.cs
- Size3DConverter.cs
- StyleBamlRecordReader.cs