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
- ServerIdentity.cs
- BezierSegment.cs
- DataGridViewComboBoxCell.cs
- Wildcard.cs
- Script.cs
- TrackBar.cs
- ActivationArguments.cs
- SessionPageStateSection.cs
- HMACSHA384.cs
- Pts.cs
- ClientConfigPaths.cs
- GetIndexBinder.cs
- DesignerUtils.cs
- GradientSpreadMethodValidation.cs
- OverlappedAsyncResult.cs
- BaseTreeIterator.cs
- SpellerHighlightLayer.cs
- SelectionChangedEventArgs.cs
- MailAddress.cs
- ToolStripMenuItem.cs
- XmlChildEnumerator.cs
- ErrorView.xaml.cs
- Collection.cs
- BoundPropertyEntry.cs
- DataGridViewTextBoxColumn.cs
- TextParentUndoUnit.cs
- InternalControlCollection.cs
- StrokeFIndices.cs
- TargetParameterCountException.cs
- WebHttpDispatchOperationSelector.cs
- DelegateTypeInfo.cs
- LineVisual.cs
- Synchronization.cs
- ChtmlTextWriter.cs
- WorkflowMarkupSerializer.cs
- MetafileHeaderWmf.cs
- ModelItemDictionary.cs
- XPathNavigatorReader.cs
- TableItemPattern.cs
- OledbConnectionStringbuilder.cs
- WmpBitmapEncoder.cs
- SoapMessage.cs
- DescendantQuery.cs
- Label.cs
- DataBindingHandlerAttribute.cs
- FixedNode.cs
- DateTimeStorage.cs
- QuaternionValueSerializer.cs
- EventPropertyMap.cs
- TrustLevel.cs
- ListViewSelectEventArgs.cs
- RadioButtonStandardAdapter.cs
- TimerElapsedEvenArgs.cs
- LocalizableResourceBuilder.cs
- COM2IProvidePropertyBuilderHandler.cs
- DrawingImage.cs
- Utils.cs
- Timeline.cs
- Label.cs
- DataRelationPropertyDescriptor.cs
- DataStreamFromComStream.cs
- HttpListenerPrefixCollection.cs
- WebBrowserEvent.cs
- LayoutExceptionEventArgs.cs
- CodeCommentStatementCollection.cs
- FullTextBreakpoint.cs
- ScopedKnownTypes.cs
- SqlCommand.cs
- ReferentialConstraintRoleElement.cs
- VisualStyleInformation.cs
- XamlToRtfParser.cs
- SecurityState.cs
- WebConfigurationHostFileChange.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- LazyInitializer.cs
- MachineSettingsSection.cs
- BrowserTree.cs
- Math.cs
- StreamSecurityUpgradeAcceptorBase.cs
- DirectoryGroupQuery.cs
- RowBinding.cs
- RegexMatchCollection.cs
- SqlTypeSystemProvider.cs
- CacheDependency.cs
- AutomationProperty.cs
- DataServiceClientException.cs
- ObjectDataSourceDesigner.cs
- ListMarkerSourceInfo.cs
- COMException.cs
- ThreadSafeList.cs
- RequiredAttributeAttribute.cs
- FileStream.cs
- SafeBitVector32.cs
- StaticSiteMapProvider.cs
- XmlWriterSettings.cs
- CodeIterationStatement.cs
- DmlSqlGenerator.cs
- CorrelationTokenTypeConvertor.cs
- QueueProcessor.cs
- KeyBinding.cs