Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / BindableAttribute.cs / 1305376 / BindableAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.ComponentModel; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class BindableAttribute : Attribute { ///Specifies whether a property is appropriate to bind data /// to. ////// public static readonly BindableAttribute Yes = new BindableAttribute(true); ////// Specifies that a property is appropriate to bind data to. This /// ///field is read-only. /// /// public static readonly BindableAttribute No = new BindableAttribute(false); ////// Specifies that a property is not appropriate to bind /// data to. This ///field is read-only. /// /// public static readonly BindableAttribute Default = No; private bool bindable = false; private bool isDefault = false; private BindingDirection direction; ////// Specifies the default value for the ///, /// which is . This field is /// read-only. /// /// public BindableAttribute(bool bindable) : this(bindable, BindingDirection.OneWay) { } ////// Initializes a new instance of the ///class. /// /// public BindableAttribute(bool bindable, BindingDirection direction) { this.bindable = bindable; this.direction = direction; } ////// Initializes a new instance of the ///class. /// /// public BindableAttribute(BindableSupport flags) : this(flags, BindingDirection.OneWay) { } ////// Initializes a new instance of the ///class. /// /// public BindableAttribute(BindableSupport flags, BindingDirection direction) { this.bindable = (flags != BindableSupport.No); this.isDefault = (flags == BindableSupport.Default); this.direction = direction; } ////// Initializes a new instance of the ///class. /// /// public bool Bindable { get { return bindable; } } ////// Gets a value indicating /// whether a property is appropriate to bind data to. /// ////// public BindingDirection Direction { get { return direction; } } ////// Gets a value indicating /// the direction(s) this property be bound to data. /// ////// /// public override bool Equals(object obj) { if (obj == this) { return true; } if (obj != null && obj is BindableAttribute) { return (((BindableAttribute)obj).Bindable == bindable); } return false; } ////// public override int GetHashCode() { return bindable.GetHashCode(); } ///[To be supplied.] ////// ///public override bool IsDefaultAttribute() { return (this.Equals(Default) || isDefault); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.ComponentModel; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class BindableAttribute : Attribute { ///Specifies whether a property is appropriate to bind data /// to. ////// public static readonly BindableAttribute Yes = new BindableAttribute(true); ////// Specifies that a property is appropriate to bind data to. This /// ///field is read-only. /// /// public static readonly BindableAttribute No = new BindableAttribute(false); ////// Specifies that a property is not appropriate to bind /// data to. This ///field is read-only. /// /// public static readonly BindableAttribute Default = No; private bool bindable = false; private bool isDefault = false; private BindingDirection direction; ////// Specifies the default value for the ///, /// which is . This field is /// read-only. /// /// public BindableAttribute(bool bindable) : this(bindable, BindingDirection.OneWay) { } ////// Initializes a new instance of the ///class. /// /// public BindableAttribute(bool bindable, BindingDirection direction) { this.bindable = bindable; this.direction = direction; } ////// Initializes a new instance of the ///class. /// /// public BindableAttribute(BindableSupport flags) : this(flags, BindingDirection.OneWay) { } ////// Initializes a new instance of the ///class. /// /// public BindableAttribute(BindableSupport flags, BindingDirection direction) { this.bindable = (flags != BindableSupport.No); this.isDefault = (flags == BindableSupport.Default); this.direction = direction; } ////// Initializes a new instance of the ///class. /// /// public bool Bindable { get { return bindable; } } ////// Gets a value indicating /// whether a property is appropriate to bind data to. /// ////// public BindingDirection Direction { get { return direction; } } ////// Gets a value indicating /// the direction(s) this property be bound to data. /// ////// /// public override bool Equals(object obj) { if (obj == this) { return true; } if (obj != null && obj is BindableAttribute) { return (((BindableAttribute)obj).Bindable == bindable); } return false; } ////// public override int GetHashCode() { return bindable.GetHashCode(); } ///[To be supplied.] ////// ///public override bool IsDefaultAttribute() { return (this.Equals(Default) || isDefault); } } } // 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
- DataPagerFieldCollection.cs
- ApplicationServicesHostFactory.cs
- XmlArrayAttribute.cs
- ChineseLunisolarCalendar.cs
- MetafileHeaderEmf.cs
- XXXInfos.cs
- ExpanderAutomationPeer.cs
- AncestorChangedEventArgs.cs
- PrintEvent.cs
- VBCodeProvider.cs
- XmlImplementation.cs
- DisplayInformation.cs
- XamlDesignerSerializationManager.cs
- SettingsAttributeDictionary.cs
- EntityCommandExecutionException.cs
- SqlRemoveConstantOrderBy.cs
- ComplexTypeEmitter.cs
- KeyEventArgs.cs
- XmlArrayItemAttributes.cs
- Crc32Helper.cs
- FixUp.cs
- QilFunction.cs
- tooltip.cs
- ProfilePropertySettings.cs
- StrokeNodeEnumerator.cs
- TemplateInstanceAttribute.cs
- PromptEventArgs.cs
- IndexedEnumerable.cs
- ActivityTypeResolver.xaml.cs
- ThemeDirectoryCompiler.cs
- WorkflowInstanceExtensionProvider.cs
- ListParaClient.cs
- X509SecurityTokenParameters.cs
- ElementHostPropertyMap.cs
- Menu.cs
- PenThread.cs
- SecurityCriticalDataForSet.cs
- ReachSerializationUtils.cs
- UnicastIPAddressInformationCollection.cs
- ThreadStartException.cs
- GenericTypeParameterBuilder.cs
- DataBoundLiteralControl.cs
- ClientTargetCollection.cs
- EndpointDiscoveryBehavior.cs
- DesignerTextWriter.cs
- CommandHelpers.cs
- PathSegment.cs
- ClientConfigurationSystem.cs
- MiniCustomAttributeInfo.cs
- SqlMethodAttribute.cs
- ProfessionalColorTable.cs
- DataTableClearEvent.cs
- XamlSerializerUtil.cs
- HttpContextServiceHost.cs
- GridViewUpdateEventArgs.cs
- InfoCardRequestException.cs
- CookieParameter.cs
- SecurityStateEncoder.cs
- UIPermission.cs
- OutputCacheSettings.cs
- SymmetricAlgorithm.cs
- SamlAdvice.cs
- diagnosticsswitches.cs
- AtomServiceDocumentSerializer.cs
- ContextStaticAttribute.cs
- SecurityDocument.cs
- AllMembershipCondition.cs
- DocumentGrid.cs
- ImmutablePropertyDescriptorGridEntry.cs
- TraceSection.cs
- VariableQuery.cs
- XmlText.cs
- CompatibleComparer.cs
- ping.cs
- ToolStripHighContrastRenderer.cs
- SortDescriptionCollection.cs
- Roles.cs
- AssociatedControlConverter.cs
- CurrencyManager.cs
- ScrollProperties.cs
- DifferencingCollection.cs
- SpellerError.cs
- ReflectionTypeLoadException.cs
- OneOfTypeConst.cs
- XmlComplianceUtil.cs
- PackagingUtilities.cs
- XPathNodeHelper.cs
- ButtonFieldBase.cs
- CFGGrammar.cs
- securitymgrsite.cs
- SqlColumnizer.cs
- CharKeyFrameCollection.cs
- QueryInterceptorAttribute.cs
- Italic.cs
- CaseInsensitiveHashCodeProvider.cs
- IDictionary.cs
- NullExtension.cs
- ItemContainerProviderWrapper.cs
- PackageStore.cs
- WebControlsSection.cs