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
- IDReferencePropertyAttribute.cs
- KnownBoxes.cs
- OpacityConverter.cs
- BrowserDefinitionCollection.cs
- LocationSectionRecord.cs
- PauseStoryboard.cs
- RadioButtonAutomationPeer.cs
- ProtocolsConfiguration.cs
- TimeZone.cs
- NamespaceInfo.cs
- GlyphInfoList.cs
- RtType.cs
- SHA512Managed.cs
- HotSpot.cs
- ScriptServiceAttribute.cs
- Utility.cs
- TextServicesManager.cs
- AuthenticationException.cs
- CodeDirectionExpression.cs
- UnicodeEncoding.cs
- AsyncPostBackTrigger.cs
- EUCJPEncoding.cs
- ServiceModelExtensionElement.cs
- Relationship.cs
- Interlocked.cs
- DropDownList.cs
- SemanticKeyElement.cs
- ResourceSet.cs
- Hyperlink.cs
- DebugHandleTracker.cs
- NavigationProperty.cs
- DocumentNUp.cs
- MouseButtonEventArgs.cs
- ArraySegment.cs
- InstanceDescriptor.cs
- ModifierKeysValueSerializer.cs
- CompositeDuplexBindingElement.cs
- ObjectStorage.cs
- CallbackValidatorAttribute.cs
- EventLogPermissionEntryCollection.cs
- CardSpacePolicyElement.cs
- RelationshipEnd.cs
- ParameterToken.cs
- XmlCharCheckingWriter.cs
- HotCommands.cs
- HtmlTernaryTree.cs
- GiveFeedbackEvent.cs
- StylusPlugInCollection.cs
- ControlCollection.cs
- FontFamilyIdentifier.cs
- MediaPlayerState.cs
- Help.cs
- User.cs
- SingleTagSectionHandler.cs
- RelativeSource.cs
- COM2ExtendedTypeConverter.cs
- FragmentQuery.cs
- CodeCatchClauseCollection.cs
- Polygon.cs
- AppDomainProtocolHandler.cs
- SpotLight.cs
- XPathAncestorIterator.cs
- RegexRunnerFactory.cs
- CalendarDay.cs
- Double.cs
- Zone.cs
- WebControlsSection.cs
- DeclaredTypeElementCollection.cs
- ObjectDataSourceMethodEventArgs.cs
- SoapHttpTransportImporter.cs
- IdentityModelDictionary.cs
- EncoderNLS.cs
- Message.cs
- ByteAnimationUsingKeyFrames.cs
- ReceiveContext.cs
- NestPullup.cs
- DatagridviewDisplayedBandsData.cs
- PeerName.cs
- View.cs
- DataPointer.cs
- HandlerBase.cs
- DataGridViewLinkCell.cs
- WebPartMovingEventArgs.cs
- EventBuilder.cs
- XmlDocumentFragment.cs
- FontFamily.cs
- SerializationException.cs
- XmlConvert.cs
- SurrogateDataContract.cs
- TypeListConverter.cs
- TreeNodeCollection.cs
- XmlTextEncoder.cs
- HelpKeywordAttribute.cs
- Repeater.cs
- WebServicesInteroperability.cs
- Identity.cs
- DetailsViewUpdatedEventArgs.cs
- KoreanLunisolarCalendar.cs
- Exceptions.cs
- DataViewManager.cs