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
- PtsPage.cs
- RowUpdatingEventArgs.cs
- WeakReadOnlyCollection.cs
- HMACSHA1.cs
- UIServiceHelper.cs
- File.cs
- HierarchicalDataBoundControl.cs
- HybridCollection.cs
- IntSecurity.cs
- FlatButtonAppearance.cs
- ArgumentException.cs
- EntityDataSourceChangingEventArgs.cs
- HttpDigestClientElement.cs
- SpeechDetectedEventArgs.cs
- WebServiceMethodData.cs
- ColorInterpolationModeValidation.cs
- DataMemberFieldConverter.cs
- DataMemberConverter.cs
- TextRunTypographyProperties.cs
- CharacterHit.cs
- ComponentCommands.cs
- ExcCanonicalXml.cs
- SpecialNameAttribute.cs
- DictionaryEditChange.cs
- IdentityReference.cs
- UpdatePanelTrigger.cs
- OpCellTreeNode.cs
- XmlIterators.cs
- KoreanCalendar.cs
- InvalidateEvent.cs
- TextBoxView.cs
- RIPEMD160.cs
- ExpressionVisitor.cs
- NodeInfo.cs
- TraceHandler.cs
- AvTraceDetails.cs
- FormsAuthentication.cs
- FailedToStartupUIException.cs
- ElasticEase.cs
- EdmComplexTypeAttribute.cs
- RuleValidation.cs
- PositiveTimeSpanValidator.cs
- ToolStrip.cs
- ProcessModuleCollection.cs
- FixedElement.cs
- SoapAttributeOverrides.cs
- DockAndAnchorLayout.cs
- XmlAttributeCollection.cs
- AutomationIdentifier.cs
- ProtocolsConfiguration.cs
- CornerRadiusConverter.cs
- Material.cs
- BaseParaClient.cs
- XamlTypeMapper.cs
- CssStyleCollection.cs
- DesignerWebPartChrome.cs
- PageEventArgs.cs
- XPathAncestorIterator.cs
- SchemaImporterExtension.cs
- ModelFunctionTypeElement.cs
- AbandonedMutexException.cs
- KeySpline.cs
- EntityContainerAssociationSetEnd.cs
- XhtmlBasicListAdapter.cs
- __FastResourceComparer.cs
- precedingquery.cs
- _BasicClient.cs
- SelectionPattern.cs
- StringUtil.cs
- MultipleCopiesCollection.cs
- RelationshipSet.cs
- ControlPersister.cs
- DynamicMethod.cs
- TlsSspiNegotiation.cs
- RuntimeConfig.cs
- CodeVariableDeclarationStatement.cs
- AliasedSlot.cs
- ItemChangedEventArgs.cs
- RichTextBoxAutomationPeer.cs
- JsonSerializer.cs
- Line.cs
- HyperLinkColumn.cs
- DiscoveryClientDocuments.cs
- DesignerOptions.cs
- StatusStrip.cs
- SspiHelper.cs
- CodeIterationStatement.cs
- ComUdtElement.cs
- ListViewDeleteEventArgs.cs
- TypedReference.cs
- WpfKnownTypeInvoker.cs
- XmlElementList.cs
- CodeMethodReturnStatement.cs
- DigitShape.cs
- BinaryConverter.cs
- CommandExpr.cs
- SystemResourceHost.cs
- BulletedList.cs
- WindowsListViewGroupSubsetLink.cs
- CompositionTarget.cs