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
- ListChangedEventArgs.cs
- QueueAccessMode.cs
- StrongBox.cs
- ExtendedPropertyDescriptor.cs
- XsdBuilder.cs
- ClickablePoint.cs
- CodeComment.cs
- CodeSnippetExpression.cs
- _SSPISessionCache.cs
- AssertSection.cs
- Vector.cs
- AttachmentCollection.cs
- StrongTypingException.cs
- DataBindingsDialog.cs
- CrossAppDomainChannel.cs
- ResourceDescriptionAttribute.cs
- CultureInfo.cs
- FunctionDescription.cs
- NativeRecognizer.cs
- Transform.cs
- PropertyRef.cs
- HistoryEventArgs.cs
- HwndPanningFeedback.cs
- DiscoveryEndpointValidator.cs
- DbDataReader.cs
- COM2ExtendedTypeConverter.cs
- HtmlLink.cs
- CodeExpressionCollection.cs
- MultilineStringConverter.cs
- LoginView.cs
- validationstate.cs
- LinkArea.cs
- SByteConverter.cs
- safemediahandle.cs
- DataGridRow.cs
- Stylus.cs
- SinglePhaseEnlistment.cs
- CodeSnippetExpression.cs
- Link.cs
- Funcletizer.cs
- WorkflowDataContext.cs
- RemoteWebConfigurationHost.cs
- ObjectListTitleAttribute.cs
- Environment.cs
- NameTable.cs
- SimpleTableProvider.cs
- PingReply.cs
- XmlUnspecifiedAttribute.cs
- SettingsBindableAttribute.cs
- CallbackHandler.cs
- GetCryptoTransformRequest.cs
- Hashtable.cs
- TextSelectionProcessor.cs
- FontUnit.cs
- EntryIndex.cs
- ListMarkerLine.cs
- Hash.cs
- RoleExceptions.cs
- SessionParameter.cs
- FixUpCollection.cs
- WebPartCloseVerb.cs
- PartialCachingControl.cs
- documentsequencetextcontainer.cs
- SoapHeaderException.cs
- X509Extension.cs
- EmbeddedMailObjectsCollection.cs
- LateBoundBitmapDecoder.cs
- SelectionUIService.cs
- BinaryObjectReader.cs
- OracleTimeSpan.cs
- SmiTypedGetterSetter.cs
- httpstaticobjectscollection.cs
- DataGridCaption.cs
- EncodingStreamWrapper.cs
- EventLog.cs
- Point.cs
- Select.cs
- SafeHandles.cs
- PathFigureCollection.cs
- GlobalItem.cs
- ExportFileRequest.cs
- QilTernary.cs
- Vector3DCollection.cs
- FileStream.cs
- MembershipUser.cs
- CaseStatement.cs
- WsdlBuildProvider.cs
- StringSorter.cs
- PipeException.cs
- CharacterHit.cs
- CoreSwitches.cs
- InstanceCreationEditor.cs
- DataBindingHandlerAttribute.cs
- sqlcontext.cs
- RoleService.cs
- DecoratedNameAttribute.cs
- DocumentXmlWriter.cs
- ControlPropertyNameConverter.cs
- GroupAggregateExpr.cs
- CmsUtils.cs