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
- AuthenticationModulesSection.cs
- Stream.cs
- ToggleProviderWrapper.cs
- DataBinding.cs
- CustomWebEventKey.cs
- AspProxy.cs
- FolderBrowserDialog.cs
- AspNetSynchronizationContext.cs
- TableSectionStyle.cs
- WebRequest.cs
- ConsoleTraceListener.cs
- sapiproxy.cs
- VariableExpressionConverter.cs
- HttpListenerElement.cs
- SimpleApplicationHost.cs
- TokenBasedSet.cs
- SystemBrushes.cs
- DrawingBrush.cs
- SystemIPv4InterfaceProperties.cs
- KernelTypeValidation.cs
- XmlNodeReader.cs
- TreeNodeStyleCollection.cs
- SoapObjectWriter.cs
- FormatSettings.cs
- OptimalTextSource.cs
- TimeSpanParse.cs
- PanelStyle.cs
- User.cs
- ApplicationException.cs
- MatrixConverter.cs
- PrinterResolution.cs
- Exceptions.cs
- HttpCacheVaryByContentEncodings.cs
- TraceLevelStore.cs
- ScriptReferenceEventArgs.cs
- ArrayItemReference.cs
- ScriptHandlerFactory.cs
- DynamicPropertyHolder.cs
- CanonicalFontFamilyReference.cs
- SmiEventSink.cs
- SqlConnectionFactory.cs
- KerberosSecurityTokenProvider.cs
- Dictionary.cs
- AutoCompleteStringCollection.cs
- DesignerDataSchemaClass.cs
- MediaContextNotificationWindow.cs
- AuthenticationModulesSection.cs
- SortedDictionary.cs
- CriticalFinalizerObject.cs
- Style.cs
- GreenMethods.cs
- WindowsAltTab.cs
- DecoratedNameAttribute.cs
- GeneratedView.cs
- CompilerError.cs
- ExceptionRoutedEventArgs.cs
- TransformerInfoCollection.cs
- BitmapDecoder.cs
- CodeSnippetStatement.cs
- InvokePattern.cs
- URIFormatException.cs
- ProfileSettingsCollection.cs
- NativeActivityMetadata.cs
- ObjectListItem.cs
- HandledMouseEvent.cs
- IImplicitResourceProvider.cs
- MbpInfo.cs
- LinqDataSourceDisposeEventArgs.cs
- ColorDialog.cs
- RtfNavigator.cs
- UnsafeNativeMethods.cs
- ObjectStateEntry.cs
- SByteConverter.cs
- _ScatterGatherBuffers.cs
- UIElement.cs
- XmlSchemaResource.cs
- SecurityTokenInclusionMode.cs
- XmlChildEnumerator.cs
- GenericIdentity.cs
- HashHelper.cs
- EnumMember.cs
- ItemContainerPattern.cs
- HideDisabledControlAdapter.cs
- WorkflowViewManager.cs
- ObjectIDGenerator.cs
- RegisteredArrayDeclaration.cs
- PrintingPermissionAttribute.cs
- SweepDirectionValidation.cs
- OutputScopeManager.cs
- UInt32Converter.cs
- SuppressIldasmAttribute.cs
- Scheduler.cs
- DataBindingHandlerAttribute.cs
- SettingsContext.cs
- ExpressionNormalizer.cs
- VisualStyleInformation.cs
- InProcStateClientManager.cs
- XPathArrayIterator.cs
- TableStyle.cs
- CacheVirtualItemsEvent.cs