Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / BindableAttribute.cs / 1 / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Style.cs
- PictureBox.cs
- WindowInteractionStateTracker.cs
- CryptoApi.cs
- LateBoundBitmapDecoder.cs
- ModelFunction.cs
- Vector.cs
- ModelItemCollection.cs
- WrapPanel.cs
- DbBuffer.cs
- XsltCompileContext.cs
- ImageButton.cs
- ToolStripInSituService.cs
- DataBoundControlDesigner.cs
- Canvas.cs
- ServiceEndpointElement.cs
- RootCodeDomSerializer.cs
- Pair.cs
- WebPartChrome.cs
- PropertyTabChangedEvent.cs
- XmlIgnoreAttribute.cs
- HtmlUtf8RawTextWriter.cs
- DiscoveryOperationContextExtension.cs
- SystemUdpStatistics.cs
- RegisteredDisposeScript.cs
- RtfToXamlLexer.cs
- InvalidTimeZoneException.cs
- ConnectionStringsExpressionBuilder.cs
- CharEntityEncoderFallback.cs
- AuthorizationSection.cs
- ReferentialConstraint.cs
- EntityDataSourceWizardForm.cs
- DetailsViewInsertEventArgs.cs
- EmptyCollection.cs
- XmlComment.cs
- BaseParagraph.cs
- SqlUtils.cs
- FileIOPermission.cs
- ExceptionRoutedEventArgs.cs
- filewebresponse.cs
- SelectionListDesigner.cs
- LinqDataSource.cs
- CodeMemberProperty.cs
- ParameterCollection.cs
- UiaCoreApi.cs
- basenumberconverter.cs
- SchemaImporter.cs
- ValidatingCollection.cs
- CodeComment.cs
- TokenizerHelper.cs
- FieldBuilder.cs
- UpdatePanelTrigger.cs
- LinearQuaternionKeyFrame.cs
- QilGeneratorEnv.cs
- PointUtil.cs
- RSAOAEPKeyExchangeFormatter.cs
- HttpListenerException.cs
- SettingsProperty.cs
- HtmlSelect.cs
- AuthorizationRule.cs
- DialogWindow.cs
- Transform3DCollection.cs
- Vector3DIndependentAnimationStorage.cs
- StdRegProviderWrapper.cs
- UrlPropertyAttribute.cs
- DesignerPerfEventProvider.cs
- EmptyElement.cs
- PrivilegedConfigurationManager.cs
- SchemaSetCompiler.cs
- MetafileHeaderEmf.cs
- KnownTypesProvider.cs
- ClientScriptManagerWrapper.cs
- DiagnosticSection.cs
- Authorization.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- IntSecurity.cs
- ApplicationManager.cs
- MulticastNotSupportedException.cs
- AstTree.cs
- ActionFrame.cs
- ViewCellRelation.cs
- IssuedTokenParametersEndpointAddressElement.cs
- RTLAwareMessageBox.cs
- SafeCoTaskMem.cs
- FormattedText.cs
- MenuCommand.cs
- AudioLevelUpdatedEventArgs.cs
- EdmToObjectNamespaceMap.cs
- FormCollection.cs
- TextReader.cs
- SynchronousChannel.cs
- Rect.cs
- PKCS1MaskGenerationMethod.cs
- ScriptIgnoreAttribute.cs
- XpsSerializerFactory.cs
- Util.cs
- HttpResponseHeader.cs
- Renderer.cs
- TextTrailingCharacterEllipsis.cs
- AlternateView.cs