Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / Model / AttachedPropertyDescriptor.cs / 1305376 / AttachedPropertyDescriptor.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Presentation.Model { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using System.Activities.Presentation.Model; class AttachedPropertyDescriptor : PropertyDescriptor { AttachedProperty AttachedProperty; ModelItem owner; public AttachedPropertyDescriptor(AttachedProperty AttachedProperty, ModelItem owner) : base(AttachedProperty.Name, null) { this.AttachedProperty = AttachedProperty; this.owner = owner; } public override AttributeCollection Attributes { get { ListattributeList = new List (); foreach (Attribute attr in TypeDescriptor.GetAttributes(this.PropertyType)) { attributeList.Add(attr); } BrowsableAttribute browsableAttribute = new BrowsableAttribute(this.IsBrowsable); attributeList.Add(browsableAttribute); return new AttributeCollection(attributeList.ToArray()); } } public override Type ComponentType { get { return this.owner.ItemType; } } public override bool IsReadOnly { get { return this.AttachedProperty.IsReadOnly; } } public override Type PropertyType { get { return this.AttachedProperty.Type; } } public override bool IsBrowsable { get { return this.AttachedProperty.IsBrowsable; } } public override bool CanResetValue(object component) { return false; } public override object GetValue(object component) { return this.AttachedProperty.GetValue(owner); } public override void ResetValue(object component) { this.AttachedProperty.ResetValue(owner); } public override void SetValue(object component, object value) { this.AttachedProperty.SetValue(owner, value); } public override bool ShouldSerializeValue(object component) { return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EncryptedData.cs
- UIElement3DAutomationPeer.cs
- XmlSchemaSimpleContentExtension.cs
- SHA256CryptoServiceProvider.cs
- PersonalizableAttribute.cs
- documentation.cs
- AuthenticateEventArgs.cs
- IncrementalHitTester.cs
- RequiredAttributeAttribute.cs
- SimpleType.cs
- RouteItem.cs
- MouseWheelEventArgs.cs
- PagesChangedEventArgs.cs
- MessageContractAttribute.cs
- BindableTemplateBuilder.cs
- WizardSideBarListControlItem.cs
- GridToolTip.cs
- StatusStrip.cs
- CanonicalizationDriver.cs
- Fault.cs
- NetworkInformationException.cs
- BlockCollection.cs
- DrawingCollection.cs
- UDPClient.cs
- ButtonBaseAutomationPeer.cs
- ProgressBarAutomationPeer.cs
- CompleteWizardStep.cs
- OdbcConnectionHandle.cs
- Tracking.cs
- GenericIdentity.cs
- StyleXamlParser.cs
- FixedDocumentPaginator.cs
- MetaForeignKeyColumn.cs
- TCEAdapterGenerator.cs
- NamespaceCollection.cs
- ConfigurationStrings.cs
- UserPreference.cs
- DataGridViewRowCollection.cs
- SettingsProperty.cs
- WriteableBitmap.cs
- SignatureConfirmationElement.cs
- RepeatBehaviorConverter.cs
- HttpException.cs
- TextBounds.cs
- PersonalizationStateInfoCollection.cs
- EdmProviderManifest.cs
- IssuedSecurityTokenProvider.cs
- TemplateColumn.cs
- SafeSerializationManager.cs
- PeerHelpers.cs
- Rect3DConverter.cs
- SystemIPAddressInformation.cs
- MarkedHighlightComponent.cs
- RouteItem.cs
- WCFServiceClientProxyGenerator.cs
- SqlAggregateChecker.cs
- TextProperties.cs
- RevocationPoint.cs
- DropSource.cs
- NamespaceCollection.cs
- StrongNameKeyPair.cs
- AssertFilter.cs
- DesignerUtils.cs
- OLEDB_Enum.cs
- InterleavedZipPartStream.cs
- ConvertEvent.cs
- CodeAccessPermission.cs
- StateMachineExecutionState.cs
- X509Utils.cs
- DateTimeSerializationSection.cs
- ProfileProvider.cs
- DependencyPropertyConverter.cs
- ItemsChangedEventArgs.cs
- BasicKeyConstraint.cs
- ActionMessageFilterTable.cs
- PropertyBuilder.cs
- CfgRule.cs
- SerializationAttributes.cs
- EdmEntityTypeAttribute.cs
- Config.cs
- ConnectivityStatus.cs
- TableSectionStyle.cs
- Brush.cs
- Fx.cs
- XmlChildEnumerator.cs
- SpeakProgressEventArgs.cs
- SerialReceived.cs
- ClusterSafeNativeMethods.cs
- Schedule.cs
- FormsAuthenticationConfiguration.cs
- FileInfo.cs
- TableCellAutomationPeer.cs
- PackageStore.cs
- JoinTreeSlot.cs
- PartitionResolver.cs
- LineBreakRecord.cs
- SystemMulticastIPAddressInformation.cs
- PrimaryKeyTypeConverter.cs
- SAPIEngineTypes.cs
- XPathNodeHelper.cs