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
- PolyQuadraticBezierSegmentFigureLogic.cs
- ServiceContractViewControl.cs
- HScrollBar.cs
- _NTAuthentication.cs
- ClientScriptManagerWrapper.cs
- SettingsAttributes.cs
- SchemaEntity.cs
- BaseCodePageEncoding.cs
- DurableDispatcherAddressingFault.cs
- TextElementEnumerator.cs
- Point3DCollectionValueSerializer.cs
- ColorConvertedBitmapExtension.cs
- DefaultValueTypeConverter.cs
- CallbackTimeoutsBehavior.cs
- Typography.cs
- DetailsViewCommandEventArgs.cs
- DataGridCellInfo.cs
- ScrollBar.cs
- BamlResourceSerializer.cs
- MethodExpr.cs
- CountAggregationOperator.cs
- TextEditorDragDrop.cs
- KernelTypeValidation.cs
- VectorCollectionValueSerializer.cs
- Rfc2898DeriveBytes.cs
- TrustLevelCollection.cs
- DefaultPropertyAttribute.cs
- mediapermission.cs
- QueryableDataSourceEditData.cs
- TabRenderer.cs
- DrawListViewItemEventArgs.cs
- MatrixCamera.cs
- TraceInternal.cs
- SqlMethodCallConverter.cs
- RoleManagerSection.cs
- SizeAnimation.cs
- DiscoveryMessageProperty.cs
- VisualTarget.cs
- BatchServiceHost.cs
- XmlTextReaderImpl.cs
- MiniConstructorInfo.cs
- ExceptionUtility.cs
- FileStream.cs
- MorphHelpers.cs
- ExceptionHandlersDesigner.cs
- Color.cs
- MaskedTextProvider.cs
- PropertyMetadata.cs
- GenerateScriptTypeAttribute.cs
- StylusButtonCollection.cs
- QilScopedVisitor.cs
- GPRECT.cs
- HttpVersion.cs
- XmlValueConverter.cs
- PasswordDeriveBytes.cs
- EntityPropertyMappingAttribute.cs
- WebPartDescriptionCollection.cs
- CompilerInfo.cs
- PrintingPermission.cs
- LinqDataSourceEditData.cs
- ZipIOExtraFieldPaddingElement.cs
- PermissionSetTriple.cs
- DataServiceStreamProviderWrapper.cs
- CodeEventReferenceExpression.cs
- UrlPath.cs
- ISAPIApplicationHost.cs
- ReadWriteControlDesigner.cs
- LinqDataSourceContextData.cs
- BackgroundWorker.cs
- MobileControlBuilder.cs
- ConvertEvent.cs
- HybridObjectCache.cs
- WebZone.cs
- BitVec.cs
- TextRenderingModeValidation.cs
- UndoUnit.cs
- SchemaElement.cs
- ResourcesGenerator.cs
- FixedHyperLink.cs
- ValueConversionAttribute.cs
- TextParaClient.cs
- PropVariant.cs
- SymbolDocumentInfo.cs
- MenuBase.cs
- WebBrowserEvent.cs
- InputLanguageProfileNotifySink.cs
- tooltip.cs
- Stroke2.cs
- RoutedEventValueSerializer.cs
- Expression.cs
- EventDescriptor.cs
- BrowserDefinition.cs
- WindowsBrush.cs
- ComEventsHelper.cs
- HtmlImage.cs
- Matrix.cs
- DataGridViewCellValidatingEventArgs.cs
- WmlPhoneCallAdapter.cs
- Exception.cs
- ChangePasswordAutoFormat.cs