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
- NavigationProgressEventArgs.cs
- BamlBinaryReader.cs
- HotSpotCollection.cs
- WizardStepBase.cs
- InsufficientMemoryException.cs
- EntityDataSourceStatementEditor.cs
- ProviderCommandInfoUtils.cs
- EventListener.cs
- BrowserCapabilitiesFactoryBase.cs
- AutomationProperties.cs
- WorkflowInstanceQuery.cs
- DemultiplexingClientMessageFormatter.cs
- EnumValidator.cs
- ExceptionHandlersDesigner.cs
- DoWorkEventArgs.cs
- DockPanel.cs
- EventDriven.cs
- SizeIndependentAnimationStorage.cs
- HttpContextBase.cs
- ObjectViewListener.cs
- HostSecurityManager.cs
- ComponentSerializationService.cs
- OleDbEnumerator.cs
- NGCSerializationManagerAsync.cs
- BinaryOperationBinder.cs
- ClientOperationFormatterProvider.cs
- DragDeltaEventArgs.cs
- ToolStripContentPanelDesigner.cs
- ObjectAssociationEndMapping.cs
- PrimitiveXmlSerializers.cs
- DataGridState.cs
- Vector.cs
- TransformValueSerializer.cs
- FontFamilyIdentifier.cs
- OracleNumber.cs
- GridItem.cs
- CellTreeNodeVisitors.cs
- LinkButton.cs
- RoleBoolean.cs
- FormViewInsertEventArgs.cs
- PropertyGridCommands.cs
- Pair.cs
- ToolStripItemClickedEventArgs.cs
- BindUriHelper.cs
- MessageQueueTransaction.cs
- CSharpCodeProvider.cs
- Utils.cs
- LoginView.cs
- DataGridViewCellCancelEventArgs.cs
- InvokeProviderWrapper.cs
- DataGridPagerStyle.cs
- MyContact.cs
- sqlser.cs
- FilterElement.cs
- TextServicesCompartmentEventSink.cs
- PerformanceCounterManager.cs
- CommandHelpers.cs
- ProxyWebPartManager.cs
- IUnknownConstantAttribute.cs
- TextBreakpoint.cs
- ProbeDuplex11AsyncResult.cs
- NamedElement.cs
- UnsignedPublishLicense.cs
- DataMemberConverter.cs
- CompositeControl.cs
- CompositeDataBoundControl.cs
- FontWeightConverter.cs
- GridViewRowEventArgs.cs
- SQLResource.cs
- BaseServiceProvider.cs
- BulletChrome.cs
- Constraint.cs
- WebPartEditVerb.cs
- SimpleWorkerRequest.cs
- DataGridViewHitTestInfo.cs
- XPathItem.cs
- DataServiceProviderWrapper.cs
- ZipIOLocalFileDataDescriptor.cs
- ProxyManager.cs
- FusionWrap.cs
- XmlToDatasetMap.cs
- StatusBarDrawItemEvent.cs
- AnnotationObservableCollection.cs
- LayoutTableCell.cs
- WebControlsSection.cs
- PbrsForward.cs
- MemberJoinTreeNode.cs
- DbConnectionOptions.cs
- ControlCachePolicy.cs
- DataList.cs
- DataGridViewCellFormattingEventArgs.cs
- DomainLiteralReader.cs
- PeerCollaborationPermission.cs
- ObjectDataSourceStatusEventArgs.cs
- HostProtectionPermission.cs
- AssociationTypeEmitter.cs
- SqlDataSource.cs
- PersonalizationStateInfo.cs
- HiddenField.cs
- TextPointer.cs