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
- IntPtr.cs
- ProcessMonitor.cs
- UnsafeNativeMethods.cs
- Monitor.cs
- FocusWithinProperty.cs
- XmlCountingReader.cs
- CodeAttributeArgumentCollection.cs
- FontSizeConverter.cs
- exports.cs
- EntityDataSourceEntitySetNameItem.cs
- SqlClientWrapperSmiStreamChars.cs
- FormViewDesigner.cs
- RawUIStateInputReport.cs
- TableLayoutCellPaintEventArgs.cs
- TraceSection.cs
- documentsequencetextpointer.cs
- XmlSchemaComplexContent.cs
- ResolveNameEventArgs.cs
- ExpressionNode.cs
- DataGridRelationshipRow.cs
- FrameworkElementFactoryMarkupObject.cs
- AttributeData.cs
- SiteMapNodeCollection.cs
- QuotedPrintableStream.cs
- IdentifierCollection.cs
- CodeDomConfigurationHandler.cs
- DrawingContextDrawingContextWalker.cs
- CircleHotSpot.cs
- ProcessInputEventArgs.cs
- ProviderBase.cs
- ToolStripDropDownClosedEventArgs.cs
- SafeLibraryHandle.cs
- CompilationUtil.cs
- MethodCallConverter.cs
- CodeCastExpression.cs
- HighlightComponent.cs
- AttachInfo.cs
- IFlowDocumentViewer.cs
- __Error.cs
- ButtonBaseAdapter.cs
- Clause.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- Version.cs
- InvokeProviderWrapper.cs
- CompiledIdentityConstraint.cs
- NonBatchDirectoryCompiler.cs
- MailWebEventProvider.cs
- Group.cs
- SapiRecognizer.cs
- BinaryNode.cs
- securitycriticaldataClass.cs
- LocatorGroup.cs
- __ComObject.cs
- SendKeys.cs
- DummyDataSource.cs
- InternalSafeNativeMethods.cs
- SelectedDatesCollection.cs
- SqlResolver.cs
- validation.cs
- EditBehavior.cs
- FormsIdentity.cs
- ItemCollection.cs
- HttpChannelBindingToken.cs
- TextParaClient.cs
- NonClientArea.cs
- WFItemsToSpacerVisibility.cs
- ActiveXHost.cs
- Icon.cs
- DesignerCategoryAttribute.cs
- DataGridComponentEditor.cs
- DateTimeParse.cs
- SerializationStore.cs
- ShaderEffect.cs
- InputDevice.cs
- FixedSOMTable.cs
- KnownTypesProvider.cs
- BaseParaClient.cs
- StylusButtonEventArgs.cs
- RtfNavigator.cs
- QilReplaceVisitor.cs
- DataServiceExpressionVisitor.cs
- ParserContext.cs
- SpellerHighlightLayer.cs
- AnyAllSearchOperator.cs
- DesigntimeLicenseContext.cs
- SelectionPattern.cs
- DataGridHeaderBorder.cs
- SoapElementAttribute.cs
- NetPeerTcpBindingCollectionElement.cs
- MethodAccessException.cs
- DataGridViewRowStateChangedEventArgs.cs
- DataPagerFieldItem.cs
- MediaPlayer.cs
- GridItemProviderWrapper.cs
- SafeRightsManagementQueryHandle.cs
- ObjectDataSourceSelectingEventArgs.cs
- MessageHeader.cs
- TextBoxView.cs
- DataSourceSerializationException.cs
- ExpandedWrapper.cs