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
- HtmlInputButton.cs
- ParseElement.cs
- NetworkStream.cs
- DataGridViewHeaderCell.cs
- XhtmlTextWriter.cs
- TypefaceMetricsCache.cs
- JsonFormatWriterGenerator.cs
- SectionRecord.cs
- FormCollection.cs
- ExceptionTrace.cs
- UpdatePanelTriggerCollection.cs
- MenuItemBindingCollection.cs
- DateTimeFormatInfoScanner.cs
- ProgressBarRenderer.cs
- ArithmeticException.cs
- ADConnectionHelper.cs
- DataSourceNameHandler.cs
- DataGridItemAutomationPeer.cs
- ImageSource.cs
- DataGridRowDetailsEventArgs.cs
- BitConverter.cs
- Number.cs
- ProfileSettings.cs
- EventLogRecord.cs
- COM2ComponentEditor.cs
- ChtmlTextWriter.cs
- FrameSecurityDescriptor.cs
- WindowsSpinner.cs
- WorkItem.cs
- CharacterHit.cs
- UnaryExpression.cs
- TabControlEvent.cs
- SqlClientWrapperSmiStream.cs
- BindStream.cs
- NodeFunctions.cs
- XamlPoint3DCollectionSerializer.cs
- TableLayoutRowStyleCollection.cs
- EntityDataSourceStatementEditorForm.cs
- SqlWebEventProvider.cs
- SafeNativeMethods.cs
- AssemblyCollection.cs
- TableLayoutPanelCellPosition.cs
- DispatcherExceptionFilterEventArgs.cs
- LinkDescriptor.cs
- XamlSerializerUtil.cs
- ServiceRoute.cs
- XmlSignatureProperties.cs
- DataRelationCollection.cs
- SingleBodyParameterMessageFormatter.cs
- UnmanagedMemoryStreamWrapper.cs
- OdbcConnectionStringbuilder.cs
- SoapMessage.cs
- AlphabeticalEnumConverter.cs
- QuaternionAnimationBase.cs
- FileDialogCustomPlaces.cs
- EventSinkHelperWriter.cs
- SurrogateEncoder.cs
- HandledEventArgs.cs
- InlineCategoriesDocument.cs
- SqlUtils.cs
- AccessDataSource.cs
- FileUtil.cs
- PropertyRef.cs
- HttpHandlerActionCollection.cs
- XmlKeywords.cs
- DrawListViewSubItemEventArgs.cs
- MembershipValidatePasswordEventArgs.cs
- SqlUDTStorage.cs
- SqlDependencyUtils.cs
- HtmlTableRowCollection.cs
- PackageDigitalSignature.cs
- TextTreeObjectNode.cs
- VBIdentifierNameEditor.cs
- CodeDomLoader.cs
- BamlMapTable.cs
- SqlUdtInfo.cs
- AppDomainManager.cs
- LogLogRecordEnumerator.cs
- MetafileHeader.cs
- RtfToXamlLexer.cs
- XamlLoadErrorInfo.cs
- SchemaAttDef.cs
- MaterialGroup.cs
- DefaultPropertyAttribute.cs
- DescriptionAttribute.cs
- ObjectStateFormatter.cs
- UsernameTokenFactoryCredential.cs
- GeometryModel3D.cs
- GridItem.cs
- FullTextLine.cs
- ImageCollectionCodeDomSerializer.cs
- XmlSerializationReader.cs
- ProjectionNode.cs
- Timeline.cs
- BitmapEffectInputData.cs
- DataGridViewRowStateChangedEventArgs.cs
- ModifiableIteratorCollection.cs
- Parser.cs
- PageBuildProvider.cs
- FontDifferentiator.cs