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
- GridItemProviderWrapper.cs
- EntityDataSourceContainerNameItem.cs
- DataSetUtil.cs
- RefType.cs
- AnimationClockResource.cs
- KeyValuePair.cs
- ApplyTemplatesAction.cs
- HtmlHistory.cs
- KeyEvent.cs
- CodeDirectoryCompiler.cs
- ToolStripSystemRenderer.cs
- SiteMapNodeCollection.cs
- DummyDataSource.cs
- JsonFaultDetail.cs
- XmlWellformedWriter.cs
- TraceContext.cs
- InvokePatternIdentifiers.cs
- DoubleAnimationClockResource.cs
- ViewLoader.cs
- Handle.cs
- AbstractSvcMapFileLoader.cs
- ProjectionNode.cs
- MexBindingElement.cs
- StringValidator.cs
- DataSourceHelper.cs
- SqlServices.cs
- XPathNavigator.cs
- CriticalHandle.cs
- ValidatorUtils.cs
- ListItemConverter.cs
- ParameterCollection.cs
- WebPartManager.cs
- ToolStripDropDown.cs
- DataControlFieldCollection.cs
- DecimalConverter.cs
- ACE.cs
- FacetValueContainer.cs
- ComplexPropertyEntry.cs
- XmlSchemaProviderAttribute.cs
- WebDisplayNameAttribute.cs
- InkCanvas.cs
- PersonalizationStateInfoCollection.cs
- HyperLinkField.cs
- ITextView.cs
- PeerValidationBehavior.cs
- SettingsContext.cs
- XPathAncestorIterator.cs
- ElementHost.cs
- CellIdBoolean.cs
- DataGridViewRowCollection.cs
- SoundPlayer.cs
- SafeNativeMethodsMilCoreApi.cs
- SeekStoryboard.cs
- Soap11ServerProtocol.cs
- FixedSOMGroup.cs
- AnnotationResourceCollection.cs
- DataControlLinkButton.cs
- URLAttribute.cs
- AutomationPatternInfo.cs
- CallbackHandler.cs
- CapiSafeHandles.cs
- FileReservationCollection.cs
- ColumnHeaderCollectionEditor.cs
- ImageAutomationPeer.cs
- UserControlCodeDomTreeGenerator.cs
- EdmScalarPropertyAttribute.cs
- TreeChangeInfo.cs
- OleCmdHelper.cs
- GroupBox.cs
- FilterException.cs
- ProtocolsConfiguration.cs
- Sql8ExpressionRewriter.cs
- TextTreeTextElementNode.cs
- SingleSelectRootGridEntry.cs
- HttpTransportSecurityElement.cs
- XmlStreamNodeWriter.cs
- NameValuePermission.cs
- FontStyles.cs
- WindowInteractionStateTracker.cs
- SchemaCollectionCompiler.cs
- AggregatePushdown.cs
- DPTypeDescriptorContext.cs
- CharConverter.cs
- MappingException.cs
- GlobalAllocSafeHandle.cs
- ModelTreeEnumerator.cs
- DragAssistanceManager.cs
- XPathException.cs
- filewebresponse.cs
- OdbcRowUpdatingEvent.cs
- HuffModule.cs
- Canvas.cs
- EntityContainer.cs
- ContractValidationHelper.cs
- TableCellAutomationPeer.cs
- DataReceivedEventArgs.cs
- ProfileSection.cs
- MouseGestureConverter.cs
- XhtmlBasicPageAdapter.cs
- GlobalizationAssembly.cs