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
- DropShadowBitmapEffect.cs
- RandomNumberGenerator.cs
- SizeChangedEventArgs.cs
- TransactionOptions.cs
- AssertFilter.cs
- TransactionChannel.cs
- UniqueCodeIdentifierScope.cs
- FamilyTypeface.cs
- RuleAttributes.cs
- WmlPageAdapter.cs
- SQLBinary.cs
- Double.cs
- TextEffect.cs
- TrayIconDesigner.cs
- KnownAssembliesSet.cs
- ZipIOExtraField.cs
- PolyBezierSegmentFigureLogic.cs
- PolyLineSegmentFigureLogic.cs
- JpegBitmapEncoder.cs
- SrgsText.cs
- FileUtil.cs
- RegexRunner.cs
- SqlProfileProvider.cs
- WithParamAction.cs
- Utils.cs
- Registry.cs
- DataGridHeaderBorder.cs
- SelectionManager.cs
- FloaterBaseParagraph.cs
- ParamArrayAttribute.cs
- MethodBuilderInstantiation.cs
- MetaChildrenColumn.cs
- SHA384.cs
- IteratorFilter.cs
- AsyncPostBackErrorEventArgs.cs
- ThreadAbortException.cs
- StateManager.cs
- BuilderPropertyEntry.cs
- PersonalizationProviderCollection.cs
- RenameRuleObjectDialog.cs
- VScrollBar.cs
- odbcmetadatacolumnnames.cs
- TableLayoutSettingsTypeConverter.cs
- AnnotationResourceChangedEventArgs.cs
- TypeListConverter.cs
- XmlDocumentFragment.cs
- MetafileHeaderWmf.cs
- ThreadStaticAttribute.cs
- ClientOperationFormatterProvider.cs
- ModelChangedEventArgsImpl.cs
- StorageRoot.cs
- MetadataSection.cs
- DataGridDetailsPresenterAutomationPeer.cs
- UnsafeNativeMethods.cs
- CardSpaceException.cs
- AVElementHelper.cs
- RuntimeConfigLKG.cs
- SourceInterpreter.cs
- WebPartCatalogAddVerb.cs
- UnsignedPublishLicense.cs
- CookieProtection.cs
- IxmlLineInfo.cs
- Roles.cs
- ClientRoleProvider.cs
- Configuration.cs
- CompilationRelaxations.cs
- RotateTransform3D.cs
- ReturnEventArgs.cs
- OneToOneMappingSerializer.cs
- BufferedGraphicsManager.cs
- FieldAccessException.cs
- BufferAllocator.cs
- DbMetaDataFactory.cs
- WebBrowser.cs
- UnSafeCharBuffer.cs
- PopOutPanel.cs
- RbTree.cs
- DispatcherTimer.cs
- DecoderReplacementFallback.cs
- MissingMemberException.cs
- ToolStripArrowRenderEventArgs.cs
- Codec.cs
- ActivityInstanceMap.cs
- TypeUsage.cs
- Trace.cs
- ValidationErrorInfo.cs
- PositiveTimeSpanValidator.cs
- FlagsAttribute.cs
- OutOfMemoryException.cs
- NumberFunctions.cs
- BitmapPalette.cs
- RoleManagerSection.cs
- HtmlInputFile.cs
- Quaternion.cs
- SequenceDesignerAccessibleObject.cs
- SafeThemeHandle.cs
- LocalFileSettingsProvider.cs
- RoutedEventConverter.cs
- XmlQueryContext.cs
- AutomationElement.cs