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
- PageRanges.cs
- FixUpCollection.cs
- PixelShader.cs
- ConsumerConnectionPointCollection.cs
- Effect.cs
- FastPropertyAccessor.cs
- DataRecordInfo.cs
- NamespaceMapping.cs
- MouseButtonEventArgs.cs
- TextStore.cs
- AppDomain.cs
- HealthMonitoringSection.cs
- MatrixTransform3D.cs
- UIElementAutomationPeer.cs
- ServerIdentity.cs
- UnsafeNativeMethods.cs
- InternalPermissions.cs
- CfgParser.cs
- MissingManifestResourceException.cs
- ColorDialog.cs
- URLAttribute.cs
- UInt16Converter.cs
- linebase.cs
- PackageRelationshipCollection.cs
- SettingsAttributes.cs
- PhysicalAddress.cs
- _emptywebproxy.cs
- BoolExpressionVisitors.cs
- OperationDescription.cs
- XmlBinaryReaderSession.cs
- StringFreezingAttribute.cs
- EncodingTable.cs
- OdbcRowUpdatingEvent.cs
- ClientBuildManager.cs
- Hyperlink.cs
- Label.cs
- XmlMemberMapping.cs
- SelectionUIHandler.cs
- AuthenticodeSignatureInformation.cs
- ActivityExecutorDelegateInfo.cs
- OdbcCommand.cs
- _NativeSSPI.cs
- StringReader.cs
- Attributes.cs
- ProcessManager.cs
- BinaryReader.cs
- PageRequestManager.cs
- DataTableCollection.cs
- NullEntityWrapper.cs
- ApplicationInfo.cs
- TransactionBridgeSection.cs
- CqlIdentifiers.cs
- ArrayConverter.cs
- DESCryptoServiceProvider.cs
- configsystem.cs
- MultiAsyncResult.cs
- FormViewInsertEventArgs.cs
- XpsDigitalSignature.cs
- WsatProxy.cs
- CompatibleComparer.cs
- HtmlTitle.cs
- TableCellCollection.cs
- FixedTextSelectionProcessor.cs
- ImageListStreamer.cs
- BitmapCacheBrush.cs
- UserPersonalizationStateInfo.cs
- InvalidWMPVersionException.cs
- ComboBoxItem.cs
- XmlElementList.cs
- XmlRawWriter.cs
- ClientUrlResolverWrapper.cs
- SQLChars.cs
- ContainerParaClient.cs
- PeerNameRegistration.cs
- DoubleAnimationClockResource.cs
- PropertyRef.cs
- HiddenField.cs
- KeyEvent.cs
- Control.cs
- LoginViewDesigner.cs
- TraceLevelHelper.cs
- LogRecordSequence.cs
- SimpleNameService.cs
- ALinqExpressionVisitor.cs
- HighlightVisual.cs
- MessageSmuggler.cs
- ParentQuery.cs
- DivideByZeroException.cs
- ColumnResizeAdorner.cs
- OracleParameterCollection.cs
- RestClientProxyHandler.cs
- SignerInfo.cs
- EventBuilder.cs
- TransportSecurityProtocolFactory.cs
- InkCanvasSelectionAdorner.cs
- BidOverLoads.cs
- WebPartMovingEventArgs.cs
- XPathArrayIterator.cs
- SafeNativeMemoryHandle.cs
- RequestResponse.cs