Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------- // 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 { List attributeList = 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
- TransactionBehavior.cs
- TextDataBindingHandler.cs
- FrameworkPropertyMetadata.cs
- HttpListener.cs
- BindableAttribute.cs
- DbSetClause.cs
- MachinePropertyVariants.cs
- ComboBox.cs
- MarkerProperties.cs
- PropertyItem.cs
- SystemWebExtensionsSectionGroup.cs
- DataGridTextBoxColumn.cs
- RoleManagerSection.cs
- WsdlWriter.cs
- ArrayExtension.cs
- DesignSurfaceEvent.cs
- SeekStoryboard.cs
- Int32Converter.cs
- XamlPointCollectionSerializer.cs
- SortQuery.cs
- CallSiteOps.cs
- XmlSchemaAttributeGroup.cs
- NamespaceList.cs
- CodeSnippetStatement.cs
- BitmapEffectState.cs
- FirstMatchCodeGroup.cs
- PublisherIdentityPermission.cs
- ErrorStyle.cs
- GridViewSortEventArgs.cs
- DesignerActionVerbList.cs
- TokenBasedSet.cs
- DocumentXmlWriter.cs
- StructuralObject.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- HttpWriter.cs
- HtmlInputText.cs
- FlowLayoutPanel.cs
- DesignTimeVisibleAttribute.cs
- EdmItemError.cs
- PagedDataSource.cs
- Crc32.cs
- SafeBuffer.cs
- PieceNameHelper.cs
- InstanceDataCollectionCollection.cs
- SortAction.cs
- DataBindingExpressionBuilder.cs
- DecodeHelper.cs
- MetabaseServerConfig.cs
- ExpandCollapseIsCheckedConverter.cs
- FloaterParaClient.cs
- ToolStripComboBox.cs
- DurationConverter.cs
- ProtectedConfigurationSection.cs
- MethodBuilderInstantiation.cs
- SqlTriggerAttribute.cs
- ListViewCommandEventArgs.cs
- QueryOutputWriter.cs
- _PooledStream.cs
- MappingException.cs
- SafeCryptoKeyHandle.cs
- CrossSiteScriptingValidation.cs
- WindowsUpDown.cs
- DataShape.cs
- XmlSchemaSet.cs
- MetadataItem_Static.cs
- MergablePropertyAttribute.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- KeysConverter.cs
- SqlDataSourceTableQuery.cs
- DrawingGroup.cs
- XmlQualifiedName.cs
- FlowDocumentReaderAutomationPeer.cs
- ResourceKey.cs
- SqlDataSource.cs
- SqlTransaction.cs
- GridViewCancelEditEventArgs.cs
- RichTextBoxAutomationPeer.cs
- ProcessHostServerConfig.cs
- Transform3D.cs
- EntityDataSourceChangedEventArgs.cs
- ToolStripContainer.cs
- RuleSettings.cs
- LayoutEngine.cs
- NetworkInformationException.cs
- EpmContentSerializerBase.cs
- XmlDataDocument.cs
- CacheAxisQuery.cs
- Font.cs
- PlatformNotSupportedException.cs
- SoapFault.cs
- SupportingTokenAuthenticatorSpecification.cs
- ClientType.cs
- Operand.cs
- SQLByte.cs
- PageThemeCodeDomTreeGenerator.cs
- KeysConverter.cs
- ConstraintConverter.cs
- RemoteWebConfigurationHostServer.cs
- QilTernary.cs
- CompletionProxy.cs