Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / MS / Internal / ComponentModel / PropertyChangeTracker.cs / 1 / 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
- ProcessInputEventArgs.cs
- UpdatePanel.cs
- ClientClassGenerator.cs
- MembershipSection.cs
- ITextView.cs
- MethodBody.cs
- TextOnlyOutput.cs
- ComboBoxAutomationPeer.cs
- AnnotationResourceChangedEventArgs.cs
- TdsParserStateObject.cs
- LicenseManager.cs
- TemplatedEditableDesignerRegion.cs
- Events.cs
- BoundConstants.cs
- WebBrowserPermission.cs
- QilReference.cs
- CancelEventArgs.cs
- securestring.cs
- BamlCollectionHolder.cs
- UdpChannelListener.cs
- SspiSafeHandles.cs
- SmtpReplyReaderFactory.cs
- RangeExpression.cs
- ThreadStartException.cs
- MergeFilterQuery.cs
- HelpKeywordAttribute.cs
- ResourceReader.cs
- OdbcUtils.cs
- ReturnEventArgs.cs
- XamlTemplateSerializer.cs
- WebConvert.cs
- TreeViewImageKeyConverter.cs
- HostingEnvironment.cs
- UnmanagedMarshal.cs
- OutputCacheSettingsSection.cs
- Button.cs
- SoapSchemaMember.cs
- StrokeRenderer.cs
- SharedConnectionListener.cs
- FragmentQueryProcessor.cs
- DateTimeFormatInfoScanner.cs
- BaseTemplateBuildProvider.cs
- BookmarkEventArgs.cs
- SafeHandles.cs
- WinEventTracker.cs
- WindowsScrollBar.cs
- NativeMethodsCLR.cs
- StorageModelBuildProvider.cs
- PersonalizationDictionary.cs
- DataGridViewCellStyleConverter.cs
- DefaultTextStoreTextComposition.cs
- ObjectQueryState.cs
- IntegrationExceptionEventArgs.cs
- ValidationRule.cs
- FontDriver.cs
- HostingEnvironment.cs
- RepeaterItemEventArgs.cs
- TextDecoration.cs
- EntityReference.cs
- SQLDateTime.cs
- PathSegment.cs
- ZipIOExtraFieldPaddingElement.cs
- PointCollection.cs
- SequenceDesignerAccessibleObject.cs
- CodeMemberMethod.cs
- FlowPosition.cs
- COM2Enum.cs
- StylusDownEventArgs.cs
- Parameter.cs
- WindowsSlider.cs
- RelationshipConstraintValidator.cs
- filewebrequest.cs
- NavigationProgressEventArgs.cs
- RepeaterCommandEventArgs.cs
- complextypematerializer.cs
- TextDecorationCollection.cs
- ObjectListField.cs
- PeerCredential.cs
- FontDifferentiator.cs
- XamlReader.cs
- WsdlContractConversionContext.cs
- ICollection.cs
- LoadItemsEventArgs.cs
- Normalization.cs
- BuildProvider.cs
- SqlDataSourceParameterParser.cs
- TypeElementCollection.cs
- ProvidePropertyAttribute.cs
- ResourcePart.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- XmlSchemaElement.cs
- Helpers.cs
- StrokeNodeOperations.cs
- NullableBoolConverter.cs
- FileDialogCustomPlacesCollection.cs
- _StreamFramer.cs
- TextPattern.cs
- CalendarDay.cs
- webbrowsersite.cs
- tibetanshape.cs