Code:
/ FX-1434 / FX-1434 / 1.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
- NotImplementedException.cs
- HttpInputStream.cs
- IntellisenseTextBox.cs
- SQLGuid.cs
- SerializationStore.cs
- SymbolEqualComparer.cs
- FormatException.cs
- SchemaCollectionCompiler.cs
- TPLETWProvider.cs
- XmlSchemaObject.cs
- TableItemStyle.cs
- ShapeTypeface.cs
- ListComponentEditor.cs
- SqlClientFactory.cs
- RightsManagementPermission.cs
- ZipIOExtraField.cs
- NamespaceTable.cs
- ExtensionSimplifierMarkupObject.cs
- HttpRuntime.cs
- webeventbuffer.cs
- ImportCatalogPart.cs
- DateTimeFormat.cs
- XamlPoint3DCollectionSerializer.cs
- EastAsianLunisolarCalendar.cs
- DataPagerFieldCommandEventArgs.cs
- NavigatingCancelEventArgs.cs
- ValidationResult.cs
- SmuggledIUnknown.cs
- CommandID.cs
- ScopeCompiler.cs
- XmlDataLoader.cs
- ColumnWidthChangedEvent.cs
- ChangePasswordDesigner.cs
- RadioButtonBaseAdapter.cs
- ProfessionalColors.cs
- Int32Animation.cs
- AnnotationHelper.cs
- AppDomain.cs
- TableLayout.cs
- GetImportFileNameRequest.cs
- AdministrationHelpers.cs
- ServerValidateEventArgs.cs
- DefaultValueAttribute.cs
- OrthographicCamera.cs
- SimpleBitVector32.cs
- documentation.cs
- ToolBarButtonClickEvent.cs
- compensatingcollection.cs
- DisposableCollectionWrapper.cs
- AQNBuilder.cs
- MailMessageEventArgs.cs
- _LoggingObject.cs
- FieldDescriptor.cs
- DayRenderEvent.cs
- NotifyParentPropertyAttribute.cs
- Rss20FeedFormatter.cs
- DataGridPageChangedEventArgs.cs
- Point3DIndependentAnimationStorage.cs
- SignedInfo.cs
- TreeNodeEventArgs.cs
- OdbcError.cs
- LateBoundChannelParameterCollection.cs
- QilInvoke.cs
- Activation.cs
- NetTcpSecurityElement.cs
- WebPartTransformerCollection.cs
- WindowsListViewSubItem.cs
- Byte.cs
- LoadedOrUnloadedOperation.cs
- XmlDataSourceNodeDescriptor.cs
- DBDataPermissionAttribute.cs
- ValueProviderWrapper.cs
- ReflectionHelper.cs
- ExtensionQuery.cs
- Thread.cs
- ConfigXmlElement.cs
- serverconfig.cs
- ConfigurationStrings.cs
- DateBoldEvent.cs
- ExpandedWrapper.cs
- Configuration.cs
- MimeTypePropertyAttribute.cs
- ThreadExceptionEvent.cs
- ButtonChrome.cs
- DynamicScriptObject.cs
- DynamicMethod.cs
- WmlValidationSummaryAdapter.cs
- SystemTcpStatistics.cs
- XamlSerializationHelper.cs
- InputLangChangeEvent.cs
- OptimisticConcurrencyException.cs
- FtpRequestCacheValidator.cs
- TagPrefixAttribute.cs
- Pair.cs
- MultiSelector.cs
- SharedPersonalizationStateInfo.cs
- TimeoutValidationAttribute.cs
- SamlSecurityTokenAuthenticator.cs
- DependencyObjectProvider.cs
- Column.cs