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
- ProcessProtocolHandler.cs
- AmbiguousMatchException.cs
- TreeViewItem.cs
- PeerPresenceInfo.cs
- SelectionPatternIdentifiers.cs
- DataGridTable.cs
- ProjectionCamera.cs
- ObjectStateManager.cs
- InstanceKeyCollisionException.cs
- ImageSource.cs
- ExceptQueryOperator.cs
- Int32AnimationUsingKeyFrames.cs
- ContentFilePart.cs
- NetSectionGroup.cs
- KeyValuePairs.cs
- AppSettingsExpressionEditor.cs
- XmlDeclaration.cs
- SqlSupersetValidator.cs
- CodeDOMProvider.cs
- VirtualizingStackPanel.cs
- TextEditorCopyPaste.cs
- SchemaImporterExtension.cs
- HtmlHead.cs
- XmlWriter.cs
- StringValidator.cs
- TextTreeUndoUnit.cs
- PageThemeBuildProvider.cs
- SQLUtility.cs
- iisPickupDirectory.cs
- IISUnsafeMethods.cs
- QilParameter.cs
- HttpListenerRequest.cs
- InternalDispatchObject.cs
- DeclarativeCatalogPart.cs
- Identifier.cs
- ForceCopyBuildProvider.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- Int64AnimationBase.cs
- SqlDataSourceAdvancedOptionsForm.cs
- BamlLocalizabilityResolver.cs
- PtsPage.cs
- NumberAction.cs
- SqlDataSourceStatusEventArgs.cs
- ExpressionReplacer.cs
- DataControlPagerLinkButton.cs
- XmlNullResolver.cs
- ConnectionModeReader.cs
- DocumentAutomationPeer.cs
- XmlQueryTypeFactory.cs
- NativeMethods.cs
- SafeNativeMethods.cs
- Trace.cs
- LayoutEvent.cs
- TextEffectCollection.cs
- FlowPosition.cs
- XmlUnspecifiedAttribute.cs
- InvokeHandlers.cs
- UserControlDocumentDesigner.cs
- AssemblyCollection.cs
- VisualBrush.cs
- BuildDependencySet.cs
- AssemblyBuilder.cs
- ToolTipService.cs
- CodeTypeParameter.cs
- LostFocusEventManager.cs
- MobileComponentEditorPage.cs
- WebBaseEventKeyComparer.cs
- FormsAuthenticationUserCollection.cs
- MultiSelector.cs
- ValidatedControlConverter.cs
- TextBoxAutomationPeer.cs
- DataColumnChangeEvent.cs
- DecimalKeyFrameCollection.cs
- EntityKey.cs
- MarkupWriter.cs
- Matrix3DConverter.cs
- URLAttribute.cs
- ServiceOperationListItemList.cs
- SelectManyQueryOperator.cs
- InstanceOwnerException.cs
- Transform3DGroup.cs
- HtmlShim.cs
- XmlImplementation.cs
- AdapterUtil.cs
- MemberExpression.cs
- DesignerObject.cs
- PkcsUtils.cs
- DispatcherEventArgs.cs
- NamespaceInfo.cs
- DesignTimeTemplateParser.cs
- PointLightBase.cs
- PersonalizationStateQuery.cs
- IndexedEnumerable.cs
- ObjectViewQueryResultData.cs
- Utils.cs
- _OSSOCK.cs
- TreeViewTemplateSelector.cs
- OdbcConnectionStringbuilder.cs
- PropertyDescriptorCollection.cs
- ConfigXmlComment.cs