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
- SearchForVirtualItemEventArgs.cs
- Int32CollectionConverter.cs
- GradientBrush.cs
- DataGridView.cs
- Catch.cs
- CircleHotSpot.cs
- RawStylusInputCustomDataList.cs
- CuspData.cs
- XmlSchemaGroupRef.cs
- ObjectDataSourceStatusEventArgs.cs
- ClientTargetSection.cs
- PrimitiveXmlSerializers.cs
- AjaxFrameworkAssemblyAttribute.cs
- Registration.cs
- DrawingDrawingContext.cs
- WpfXamlMember.cs
- ObjectSet.cs
- DataGridViewRowsRemovedEventArgs.cs
- HttpValueCollection.cs
- Ipv6Element.cs
- CharacterBufferReference.cs
- RegisteredDisposeScript.cs
- HandleExceptionArgs.cs
- odbcmetadatacolumnnames.cs
- DPTypeDescriptorContext.cs
- ClientSettingsStore.cs
- XmlSchemaImporter.cs
- IndexExpression.cs
- WindowsImpersonationContext.cs
- StagingAreaInputItem.cs
- XmlSchemaIdentityConstraint.cs
- TabControlEvent.cs
- ServiceContractGenerationContext.cs
- MsmqChannelFactoryBase.cs
- PropertyValueChangedEvent.cs
- SoapExtensionTypeElement.cs
- DragStartedEventArgs.cs
- Stroke2.cs
- WebPartMenuStyle.cs
- CodePageEncoding.cs
- DbConnectionOptions.cs
- Stylesheet.cs
- SiteMapPath.cs
- PrinterUnitConvert.cs
- XmlSchemaSimpleTypeUnion.cs
- XamlPoint3DCollectionSerializer.cs
- CatalogPartChrome.cs
- SystemIPInterfaceStatistics.cs
- SimpleRecyclingCache.cs
- WebFaultClientMessageInspector.cs
- LogConverter.cs
- SuppressMessageAttribute.cs
- ListViewUpdateEventArgs.cs
- RevocationPoint.cs
- ContextProperty.cs
- RunClient.cs
- Animatable.cs
- ContentFileHelper.cs
- CultureInfoConverter.cs
- TreeView.cs
- PropertyCondition.cs
- EditorPartCollection.cs
- DesigntimeLicenseContextSerializer.cs
- SqlRecordBuffer.cs
- EventArgs.cs
- EmptyStringExpandableObjectConverter.cs
- DragAssistanceManager.cs
- Screen.cs
- MDIControlStrip.cs
- AmbientLight.cs
- HashCoreRequest.cs
- AuthenticationSection.cs
- ToolStripContentPanelRenderEventArgs.cs
- SortQuery.cs
- HttpResponseWrapper.cs
- WebPartEditorApplyVerb.cs
- VScrollProperties.cs
- MetadataException.cs
- AbstractExpressions.cs
- ViewGenResults.cs
- SmiEventSink_Default.cs
- OleDbParameterCollection.cs
- CodeNamespaceImportCollection.cs
- TextElementCollection.cs
- BindingOperations.cs
- X509WindowsSecurityToken.cs
- Light.cs
- TabControl.cs
- FontFamilyIdentifier.cs
- StringComparer.cs
- IResourceProvider.cs
- VectorAnimation.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- EmbeddedMailObjectsCollection.cs
- SeekStoryboard.cs
- SafeNativeMethods.cs
- ToolTipService.cs
- grammarelement.cs
- ExpressionParser.cs
- XmlNamedNodeMap.cs