Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DynamicResourceExtensionConverter.cs
- SiteMapNodeItem.cs
- WebPartTracker.cs
- ClientRolePrincipal.cs
- ResourcePool.cs
- DataColumnChangeEvent.cs
- TranslateTransform3D.cs
- ToolStripOverflow.cs
- WindowsGrip.cs
- WebAdminConfigurationHelper.cs
- DeferredSelectedIndexReference.cs
- RijndaelManagedTransform.cs
- ReadOnlyHierarchicalDataSource.cs
- RelationshipConstraintValidator.cs
- VisualStyleRenderer.cs
- OleDbTransaction.cs
- WebBaseEventKeyComparer.cs
- DetailsViewInsertedEventArgs.cs
- StringUtil.cs
- ScriptingAuthenticationServiceSection.cs
- MsmqException.cs
- ProjectionCamera.cs
- ToolBarTray.cs
- XmlSchemaIdentityConstraint.cs
- Attributes.cs
- IPipelineRuntime.cs
- tibetanshape.cs
- BitmapScalingModeValidation.cs
- DataGridViewCheckBoxColumn.cs
- InstanceData.cs
- UnionQueryOperator.cs
- DataPagerCommandEventArgs.cs
- DataGridItem.cs
- MetadataItemEmitter.cs
- NamedPipeConnectionPool.cs
- SiteMapPathDesigner.cs
- SamlAdvice.cs
- QilChoice.cs
- followingquery.cs
- HScrollBar.cs
- DataTableTypeConverter.cs
- ContextBase.cs
- Substitution.cs
- AttributeEmitter.cs
- DataGridViewCellFormattingEventArgs.cs
- DocumentGrid.cs
- ObjectDataSourceFilteringEventArgs.cs
- _FixedSizeReader.cs
- TextClipboardData.cs
- DataGridViewImageColumn.cs
- odbcmetadatafactory.cs
- IriParsingElement.cs
- BaseUriHelper.cs
- ScrollChrome.cs
- SecurityMessageProperty.cs
- Literal.cs
- GeneralTransform.cs
- AbandonedMutexException.cs
- NullableDecimalAverageAggregationOperator.cs
- ValueType.cs
- RootBrowserWindow.cs
- OracleInternalConnection.cs
- FunctionUpdateCommand.cs
- AnnouncementDispatcherAsyncResult.cs
- QuaternionAnimationUsingKeyFrames.cs
- RunClient.cs
- WebPartTracker.cs
- ApplyImportsAction.cs
- HtmlInputSubmit.cs
- WindowsRichEditRange.cs
- SelectionChangedEventArgs.cs
- BatchParser.cs
- Accessors.cs
- SettingsPropertyIsReadOnlyException.cs
- JulianCalendar.cs
- TypeToStringValueConverter.cs
- MetadataSerializer.cs
- SQLSingleStorage.cs
- EdmTypeAttribute.cs
- MetadataHelper.cs
- MetricEntry.cs
- TypeExtensionSerializer.cs
- HttpWebRequest.cs
- Variant.cs
- UnicodeEncoding.cs
- DataGridViewRowStateChangedEventArgs.cs
- StyleCollection.cs
- ButtonBaseAutomationPeer.cs
- SimpleHandlerBuildProvider.cs
- BitmapPalette.cs
- Vars.cs
- Control.cs
- MouseGesture.cs
- EdmConstants.cs
- ToolStripEditorManager.cs
- TreeView.cs
- ScaleTransform.cs
- Dictionary.cs
- RoutedPropertyChangedEventArgs.cs
- SoapHeaders.cs