Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / MS / Internal / ComponentModel / PropertyChangeTracker.cs / 1305600 / PropertyChangeTracker.cs
namespace MS.Internal.ComponentModel { using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Security.Permissions; using System.Windows; ////// A change tracking expression that is used to raise property change events. /// internal class PropertyChangeTracker : Expression { internal PropertyChangeTracker(DependencyObject obj, DependencyProperty property) : base(ExpressionMode.NonSharable | ExpressionMode.ForwardsInvalidations) { Debug.Assert(obj != null && property != null); _object = obj; _property = property; ChangeSources(_object, _property, new DependencySource[] { new DependencySource(obj, property) }); } internal override void OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args) { DependencyProperty dp = args.Property; if (_object == d && _property == dp && Changed != null) { Changed(_object, EventArgs.Empty); } } internal void Close() { _object = null; _property = null; ChangeSources(null, null, null); } internal bool CanClose { get { return Changed == null; } } internal EventHandler Changed; private DependencyObject _object; private DependencyProperty _property; } } // 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
- NativeMethodsOther.cs
- CompositeScriptReference.cs
- Fonts.cs
- PropertyStore.cs
- DataGridItemAttachedStorage.cs
- ClrProviderManifest.cs
- StreamUpdate.cs
- GPRECTF.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- AppSettingsSection.cs
- IntSecurity.cs
- Soap12ServerProtocol.cs
- TextParagraph.cs
- TextParagraphView.cs
- mactripleDES.cs
- AuthStoreRoleProvider.cs
- SchemaImporterExtensionElement.cs
- xmlsaver.cs
- SynchronizedCollection.cs
- ToggleProviderWrapper.cs
- ConfigXmlSignificantWhitespace.cs
- QueryReaderSettings.cs
- AnnotationStore.cs
- DataObjectPastingEventArgs.cs
- Nodes.cs
- COM2ComponentEditor.cs
- ServiceOperationParameter.cs
- XamlFilter.cs
- DoubleLink.cs
- PeerInvitationResponse.cs
- SoapExtensionReflector.cs
- DrawingBrush.cs
- FlatButtonAppearance.cs
- WebPartVerbsEventArgs.cs
- BezierSegment.cs
- ValidationError.cs
- DecoderBestFitFallback.cs
- ProfessionalColors.cs
- ObjectStateFormatter.cs
- MyContact.cs
- LinqDataSourceView.cs
- ListViewCommandEventArgs.cs
- ProxyWebPart.cs
- DataObjectAttribute.cs
- RoutedEvent.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- PropertyGrid.cs
- StrokeNode.cs
- MemberAssignment.cs
- KeyGestureValueSerializer.cs
- MatrixTransform3D.cs
- FeatureSupport.cs
- SortAction.cs
- UIElementParagraph.cs
- PasswordPropertyTextAttribute.cs
- CodeCommentStatement.cs
- RetrieveVirtualItemEventArgs.cs
- LifetimeMonitor.cs
- FrameworkContentElement.cs
- SQLBytesStorage.cs
- Panel.cs
- Vector3DConverter.cs
- XmlSchemaGroupRef.cs
- ListView.cs
- FieldTemplateFactory.cs
- InternalBase.cs
- CommandEventArgs.cs
- DefaultDiscoveryServiceExtension.cs
- TypeDescriptionProviderAttribute.cs
- SecurityDocument.cs
- ApplicationSecurityInfo.cs
- AnonymousIdentificationModule.cs
- MethodBuilder.cs
- SqlUtils.cs
- DetailsView.cs
- ValidatingReaderNodeData.cs
- SynchronizationFilter.cs
- KeyValuePairs.cs
- HttpRuntime.cs
- SoapInteropTypes.cs
- SocketPermission.cs
- QuaternionValueSerializer.cs
- UDPClient.cs
- VirtualizingPanel.cs
- LineInfo.cs
- NativeCompoundFileAPIs.cs
- AssemblyContextControlItem.cs
- Scheduler.cs
- WindowsHyperlink.cs
- SqlConnection.cs
- CodePrimitiveExpression.cs
- InternalCache.cs
- Brush.cs
- StructuredType.cs
- XAMLParseException.cs
- Variable.cs
- IgnoreSectionHandler.cs
- GeometryCombineModeValidation.cs
- MarshalByRefObject.cs
- MenuItemBindingCollection.cs