Code:
/ FX-1434 / FX-1434 / 1.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
- SHA1CryptoServiceProvider.cs
- SiteOfOriginPart.cs
- PanningMessageFilter.cs
- DATA_BLOB.cs
- HwndHost.cs
- MenuItemCollectionEditor.cs
- ControllableStoryboardAction.cs
- ListChangedEventArgs.cs
- ExpressionWriter.cs
- HandoffBehavior.cs
- DataContractSerializerElement.cs
- ProfileGroupSettingsCollection.cs
- DeobfuscatingStream.cs
- NavigatingCancelEventArgs.cs
- XmlnsDefinitionAttribute.cs
- IODescriptionAttribute.cs
- TextFormatterHost.cs
- VarInfo.cs
- MaskDescriptor.cs
- ActivityTypeCodeDomSerializer.cs
- SmtpClient.cs
- M3DUtil.cs
- TextSelection.cs
- XmlSchemaAnnotated.cs
- CodeMethodReturnStatement.cs
- SqlDataSourceAdvancedOptionsForm.cs
- XamlWriter.cs
- ImageAnimator.cs
- DesignerGeometryHelper.cs
- MimeObjectFactory.cs
- FilterException.cs
- SoapTypeAttribute.cs
- Mapping.cs
- IPAddress.cs
- ToolBarButtonClickEvent.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- ActivityTypeDesigner.xaml.cs
- SaveFileDialog.cs
- MonthCalendar.cs
- FieldAccessException.cs
- ToolBarTray.cs
- LinqDataView.cs
- HttpPostedFile.cs
- _CookieModule.cs
- PowerStatus.cs
- COM2TypeInfoProcessor.cs
- SettingsBindableAttribute.cs
- EntityDesignerUtils.cs
- TreeView.cs
- IteratorFilter.cs
- CodeIdentifier.cs
- SendReply.cs
- InfocardClientCredentials.cs
- WsatTransactionInfo.cs
- WindowsScrollBarBits.cs
- MediaPlayer.cs
- EnumUnknown.cs
- RecordBuilder.cs
- CodeMemberEvent.cs
- UniqueConstraint.cs
- NonPrimarySelectionGlyph.cs
- XpsSerializationManagerAsync.cs
- BoundingRectTracker.cs
- AssemblyBuilderData.cs
- ApplicationSecurityInfo.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- dataSvcMapFileLoader.cs
- TextEditorTables.cs
- SizeF.cs
- XamlVector3DCollectionSerializer.cs
- ProgressBarHighlightConverter.cs
- FileCodeGroup.cs
- HtmlInputCheckBox.cs
- MemberRelationshipService.cs
- ProxyFragment.cs
- HttpPostedFile.cs
- PerspectiveCamera.cs
- XmlDeclaration.cs
- CloseCryptoHandleRequest.cs
- DoubleAnimationUsingKeyFrames.cs
- LZCodec.cs
- RunClient.cs
- NullableLongSumAggregationOperator.cs
- DataAdapter.cs
- DriveNotFoundException.cs
- NGCUIElementCollectionSerializerAsync.cs
- MultiPropertyDescriptorGridEntry.cs
- MediaPlayerState.cs
- oledbmetadatacollectionnames.cs
- SmiEventSink_Default.cs
- NumberFormatInfo.cs
- TCPListener.cs
- ConnectionString.cs
- BitmapEffectrendercontext.cs
- HttpConfigurationSystem.cs
- SolidColorBrush.cs
- XamlClipboardData.cs
- CodeParameterDeclarationExpressionCollection.cs
- KeyGestureConverter.cs
- SqlMultiplexer.cs