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
- SmtpNegotiateAuthenticationModule.cs
- DescendentsWalkerBase.cs
- GridViewCellAutomationPeer.cs
- AsyncOperationContext.cs
- XsltFunctions.cs
- JumpList.cs
- PageSettings.cs
- InheritanceService.cs
- SafeIUnknown.cs
- EntityDataSourceDataSelection.cs
- URLMembershipCondition.cs
- DataKey.cs
- MethodBuilderInstantiation.cs
- CombinedGeometry.cs
- ToolTipService.cs
- FrugalMap.cs
- StreamProxy.cs
- HtmlMeta.cs
- ValueQuery.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- _NtlmClient.cs
- CultureTable.cs
- SkipQueryOptionExpression.cs
- ScrollBar.cs
- CLSCompliantAttribute.cs
- DataGridTemplateColumn.cs
- DataRowCollection.cs
- FormViewInsertEventArgs.cs
- XXXOnTypeBuilderInstantiation.cs
- PublisherMembershipCondition.cs
- TextEffectResolver.cs
- StringConverter.cs
- XmlSchemaImporter.cs
- ConstraintCollection.cs
- FrameworkElementFactory.cs
- RetrieveVirtualItemEventArgs.cs
- UriTemplateVariableQueryValue.cs
- DBCommand.cs
- _TLSstream.cs
- webclient.cs
- ToolBarButtonClickEvent.cs
- XPathChildIterator.cs
- HostingPreferredMapPath.cs
- BindingRestrictions.cs
- SingleAnimation.cs
- ProfessionalColors.cs
- ReadingWritingEntityEventArgs.cs
- StringToken.cs
- Decoder.cs
- HttpCapabilitiesEvaluator.cs
- PersistStreamTypeWrapper.cs
- QuotedStringFormatReader.cs
- PriorityRange.cs
- ImageSource.cs
- BlockUIContainer.cs
- CodeMemberProperty.cs
- SqlBulkCopyColumnMapping.cs
- Brush.cs
- WebPartDisplayModeCancelEventArgs.cs
- fixedPageContentExtractor.cs
- _SslState.cs
- CssClassPropertyAttribute.cs
- InvalidOleVariantTypeException.cs
- DependencyProperty.cs
- DetailsViewInsertedEventArgs.cs
- Propagator.JoinPropagator.cs
- ManipulationCompletedEventArgs.cs
- TextDecoration.cs
- XmlStringTable.cs
- UnmanagedMarshal.cs
- Journal.cs
- RenamedEventArgs.cs
- XmlCountingReader.cs
- ControlUtil.cs
- TraceFilter.cs
- DesignUtil.cs
- ResourceAttributes.cs
- CategoryAttribute.cs
- XmlException.cs
- basecomparevalidator.cs
- ComplexLine.cs
- AssemblyNameProxy.cs
- ChineseLunisolarCalendar.cs
- UserControlBuildProvider.cs
- FrameworkElementFactory.cs
- XmlSchemaRedefine.cs
- MatrixUtil.cs
- DataGridViewCellEventArgs.cs
- DataControlPagerLinkButton.cs
- EmptyStringExpandableObjectConverter.cs
- GenericRootAutomationPeer.cs
- ControlPaint.cs
- BindingExpressionBase.cs
- BinaryConverter.cs
- CredentialCache.cs
- ConfigurationStrings.cs
- Hex.cs
- Automation.cs
- NaturalLanguageHyphenator.cs
- AggregationMinMaxHelpers.cs