Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / MS / Internal / ComponentModel / DependencyPropertyAttribute.cs / 1 / DependencyPropertyAttribute.cs
namespace MS.Internal.ComponentModel { using System; using System.Windows; ////// This attribute is synthesized by our DependencyObjectProvider /// to relate a property descriptor back to a dependency property. /// [AttributeUsage(AttributeTargets.Method)] internal sealed class DependencyPropertyAttribute : Attribute { //------------------------------------------------------ // // Constructors // //----------------------------------------------------- #region Constructors ////// Creates a new DependencyPropertyAttribute for the given dependency property. /// internal DependencyPropertyAttribute(DependencyProperty dependencyProperty, bool isAttached) { if (dependencyProperty == null) throw new ArgumentNullException("dependencyProperty"); _dp = dependencyProperty; _isAttached = isAttached; } #endregion Constructors //----------------------------------------------------- // // Public Methods // //----------------------------------------------------- #region Public Methods ////// Override of Object.Equals that returns true when the dependency /// property contained within each attribute is the same. /// public override bool Equals(object value) { DependencyPropertyAttribute da = value as DependencyPropertyAttribute; if (da != null && object.ReferenceEquals(da._dp, _dp) && da._isAttached == _isAttached) { return true; } return false; } ////// Override of Object.GetHashCode(); /// public override int GetHashCode() { return _dp.GetHashCode(); } #endregion Public Methods //------------------------------------------------------ // // Public Operators // //----------------------------------------------------- //------------------------------------------------------ // // Public Properties // //------------------------------------------------------ #region Public Properties ////// Overrides Attribute.TypeId to be unique with respect to /// other dependency property attributes.c /// public override object TypeId { get { return typeof(DependencyPropertyAttribute); } } #endregion Public Properties //----------------------------------------------------- // // Public Events // //------------------------------------------------------ //----------------------------------------------------- // // Internal Properties // //----------------------------------------------------- #region Internal Properties ////// Returns whether the dependency property is an attached /// property. /// internal bool IsAttached { get { return _isAttached; } } ////// Returns the dependency property instance this attribute is /// associated with. /// internal DependencyProperty DependencyProperty { get { return _dp; } } #endregion Internal Properties //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private DependencyProperty _dp; private bool _isAttached; #endregion Private Fields } } // 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
- ValidationPropertyAttribute.cs
- AppliedDeviceFiltersEditor.cs
- ObjectTag.cs
- UIHelper.cs
- DataBindingCollectionConverter.cs
- SearchForVirtualItemEventArgs.cs
- ItemType.cs
- DataGridViewAccessibleObject.cs
- DBNull.cs
- SslSecurityTokenParameters.cs
- NamedPipeAppDomainProtocolHandler.cs
- BeginStoryboard.cs
- NamedPipeConnectionPoolSettings.cs
- TimeSpanConverter.cs
- AssemblyAssociatedContentFileAttribute.cs
- JsonFormatWriterGenerator.cs
- Queue.cs
- SystemBrushes.cs
- SQLDoubleStorage.cs
- IndexedEnumerable.cs
- AssemblyFilter.cs
- ProxyWebPart.cs
- TrackingMemoryStream.cs
- ApplicationSecurityManager.cs
- EntityViewGenerator.cs
- SymbolType.cs
- NetworkInformationException.cs
- MultilineStringEditor.cs
- fixedPageContentExtractor.cs
- MobileListItem.cs
- DelayDesigner.cs
- WebPartAddingEventArgs.cs
- _NetworkingPerfCounters.cs
- ListSortDescription.cs
- StartFileNameEditor.cs
- CodeDomSerializerException.cs
- IPipelineRuntime.cs
- HttpHandler.cs
- ValueSerializer.cs
- StreamGeometryContext.cs
- ListSortDescription.cs
- GridErrorDlg.cs
- CatalogZoneBase.cs
- LayoutExceptionEventArgs.cs
- DesignOnlyAttribute.cs
- DBConcurrencyException.cs
- GridViewCancelEditEventArgs.cs
- MetadataItem.cs
- Drawing.cs
- RowsCopiedEventArgs.cs
- DragCompletedEventArgs.cs
- ResourceManagerWrapper.cs
- Pair.cs
- ExtenderProviderService.cs
- ToolStripTextBox.cs
- X509Certificate2Collection.cs
- OracleCommandBuilder.cs
- ValueExpressions.cs
- X509ChainPolicy.cs
- VirtualizedContainerService.cs
- ProvidersHelper.cs
- ProcessHostServerConfig.cs
- SoapMessage.cs
- ParserHooks.cs
- XmlIterators.cs
- LocalIdKeyIdentifierClause.cs
- DefaultEventAttribute.cs
- VScrollProperties.cs
- mediaclock.cs
- SettingsBindableAttribute.cs
- ValueOfAction.cs
- DBDataPermissionAttribute.cs
- EntityCommand.cs
- DataGridViewAccessibleObject.cs
- DashStyle.cs
- StrongNamePublicKeyBlob.cs
- TypeConverterAttribute.cs
- EnvelopeVersion.cs
- RangeBaseAutomationPeer.cs
- TypeSystem.cs
- CompressedStack.cs
- DataListItemCollection.cs
- Propagator.ExtentPlaceholderCreator.cs
- PersonalizationAdministration.cs
- SendingRequestEventArgs.cs
- SHA1Managed.cs
- TemplateAction.cs
- MsmqChannelFactoryBase.cs
- CodeDelegateInvokeExpression.cs
- HtmlTableRowCollection.cs
- WebPartConnectionsConfigureVerb.cs
- WeakReadOnlyCollection.cs
- FacetValues.cs
- DataGridViewColumnStateChangedEventArgs.cs
- SetState.cs
- GatewayIPAddressInformationCollection.cs
- PlaceHolder.cs
- NavigationFailedEventArgs.cs
- ExpandedWrapper.cs
- DrawingBrush.cs