Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / SettingsBindableAttribute.cs / 1 / SettingsBindableAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// Use this attribute to specify typical properties on components that can be bound /// to application settings. /// [AttributeUsage(AttributeTargets.Property)] public sealed class SettingsBindableAttribute : Attribute { ////// Specifies that a property is appropriate to bind settings to. /// public static readonly SettingsBindableAttribute Yes = new SettingsBindableAttribute(true); ////// Specifies that a property is not appropriate to bind settings to. /// public static readonly SettingsBindableAttribute No = new SettingsBindableAttribute(false); private bool _bindable = false; public SettingsBindableAttribute(bool bindable) { _bindable = bindable; } ////// Gets a value indicating whether a property is appropriate to bind settings to. /// public bool Bindable { get { return _bindable; } } public override bool Equals(object obj) { if (obj == this) { return true; } if (obj != null && obj is SettingsBindableAttribute) { return (((SettingsBindableAttribute)obj).Bindable == _bindable); } return false; } public override int GetHashCode() { return _bindable.GetHashCode(); } } } // 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.Diagnostics; using System.Security.Permissions; ////// Use this attribute to specify typical properties on components that can be bound /// to application settings. /// [AttributeUsage(AttributeTargets.Property)] public sealed class SettingsBindableAttribute : Attribute { ////// Specifies that a property is appropriate to bind settings to. /// public static readonly SettingsBindableAttribute Yes = new SettingsBindableAttribute(true); ////// Specifies that a property is not appropriate to bind settings to. /// public static readonly SettingsBindableAttribute No = new SettingsBindableAttribute(false); private bool _bindable = false; public SettingsBindableAttribute(bool bindable) { _bindable = bindable; } ////// Gets a value indicating whether a property is appropriate to bind settings to. /// public bool Bindable { get { return _bindable; } } public override bool Equals(object obj) { if (obj == this) { return true; } if (obj != null && obj is SettingsBindableAttribute) { return (((SettingsBindableAttribute)obj).Bindable == _bindable); } return false; } public override int GetHashCode() { return _bindable.GetHashCode(); } } } // 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
- EventRoute.cs
- MSAANativeProvider.cs
- PointAnimationUsingPath.cs
- CodeDirectoryCompiler.cs
- PeerInvitationResponse.cs
- DependencyPropertyValueSerializer.cs
- BamlBinaryReader.cs
- DeviceContext.cs
- IndexerReference.cs
- LineServices.cs
- XmlSchemaSimpleTypeRestriction.cs
- FilterElement.cs
- PeerOutputChannel.cs
- HelpKeywordAttribute.cs
- FontSizeConverter.cs
- DictionaryEntry.cs
- LayoutSettings.cs
- RepeatInfo.cs
- BitmapScalingModeValidation.cs
- VarInfo.cs
- TextParagraphProperties.cs
- XmlSchemaRedefine.cs
- OrderedDictionary.cs
- BasicHttpMessageSecurityElement.cs
- IgnoreFileBuildProvider.cs
- Matrix3D.cs
- TableRow.cs
- DetailsViewDeletedEventArgs.cs
- WindowsImpersonationContext.cs
- XpsDigitalSignature.cs
- XmlBaseReader.cs
- ServerValidateEventArgs.cs
- XPathNodeList.cs
- OutputCacheSettings.cs
- XamlReaderHelper.cs
- FileDocument.cs
- DataGridViewEditingControlShowingEventArgs.cs
- Flowchart.cs
- ConnectionsZoneAutoFormat.cs
- MiniModule.cs
- SafeNativeHandle.cs
- SystemResources.cs
- EntityDataSourceEntityTypeFilterItem.cs
- APCustomTypeDescriptor.cs
- ReadOnlyCollection.cs
- IncrementalCompileAnalyzer.cs
- ProfileProvider.cs
- IIS7WorkerRequest.cs
- ThemeDictionaryExtension.cs
- MediaPlayer.cs
- ComplexLine.cs
- ValidatingPropertiesEventArgs.cs
- CryptoProvider.cs
- AuthenticationManager.cs
- StylusCollection.cs
- RtfToXamlLexer.cs
- DataGridViewToolTip.cs
- DataQuery.cs
- HttpNamespaceReservationInstallComponent.cs
- SqlVersion.cs
- ContractListAdapter.cs
- DataSourceControlBuilder.cs
- EventDescriptorCollection.cs
- PropertyCollection.cs
- SerializationException.cs
- ResourcesBuildProvider.cs
- MdImport.cs
- ThemeInfoAttribute.cs
- HeaderFilter.cs
- ProviderUtil.cs
- GridItemPattern.cs
- Globals.cs
- CustomPopupPlacement.cs
- ContractBase.cs
- util.cs
- NamespaceEmitter.cs
- Choices.cs
- Compiler.cs
- PixelShader.cs
- SaveFileDialog.cs
- InputLanguage.cs
- StrokeFIndices.cs
- DataGridAutomationPeer.cs
- OdbcConnectionStringbuilder.cs
- ConnectionStringSettingsCollection.cs
- ZeroOpNode.cs
- OdbcTransaction.cs
- OpenFileDialog.cs
- FileDialogCustomPlace.cs
- EntityDataReader.cs
- CodeFieldReferenceExpression.cs
- Calendar.cs
- HitTestFilterBehavior.cs
- IisTraceListener.cs
- OpenFileDialog.cs
- Input.cs
- QilFactory.cs
- SoapMessage.cs
- ToggleButtonAutomationPeer.cs
- CompiledXpathExpr.cs