Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / DesignTimeVisibleAttribute.cs / 1 / DesignTimeVisibleAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using System;
using System.Security.Permissions;
///
///
/// DesignTimeVisibileAttribute marks a component's visibility. If
/// DesignTimeVisibileAttribute.Yes is present, a visual designer can show
/// this component on a designer.
///
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
public sealed class DesignTimeVisibleAttribute : Attribute {
private bool visible;
///
/// Creates a new DesignTimeVisibleAttribute with the visible
/// property set to the given value.
///
public DesignTimeVisibleAttribute(bool visible) {
this.visible = visible;
}
///
/// Creates a new DesignTimeVisibleAttribute set to the default
/// value of true.
///
public DesignTimeVisibleAttribute() {
}
///
/// True if this component should be shown at design time, or false
/// if it shouldn't.
///
public bool Visible {
get {
return visible;
}
}
///
/// Marks a component as visible in a visual designer.
///
public static readonly DesignTimeVisibleAttribute Yes = new DesignTimeVisibleAttribute(true);
///
/// Marks a component as not visible in a visual designer.
///
public static readonly DesignTimeVisibleAttribute No = new DesignTimeVisibleAttribute(false);
///
/// The default visiblity. (equal to Yes.)
///
public static readonly DesignTimeVisibleAttribute Default = Yes;
///
/// [To be supplied.]
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
DesignTimeVisibleAttribute other = obj as DesignTimeVisibleAttribute;
return other != null && other.Visible == visible;
}
///
/// [To be supplied.]
///
public override int GetHashCode() {
return typeof(DesignTimeVisibleAttribute).GetHashCode() ^ (visible ? -1 : 0);
}
///
/// [To be supplied.]
///
public override bool IsDefaultAttribute() {
return (this.Visible == Default.Visible);
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ToolTipService.cs
- CatalogZoneBase.cs
- FrameworkElementFactoryMarkupObject.cs
- SplashScreenNativeMethods.cs
- Processor.cs
- InputProcessorProfilesLoader.cs
- InputLangChangeRequestEvent.cs
- PeerNodeTraceRecord.cs
- RuntimeConfigLKG.cs
- sqlser.cs
- DataGridViewRowCancelEventArgs.cs
- IOException.cs
- SByteConverter.cs
- UserPreferenceChangedEventArgs.cs
- AttributeConverter.cs
- TemplatedAdorner.cs
- ConfigurationPermission.cs
- DataControlPagerLinkButton.cs
- RequestCacheEntry.cs
- KoreanLunisolarCalendar.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- SessionParameter.cs
- WebPart.cs
- HealthMonitoringSection.cs
- ListItemsCollectionEditor.cs
- DeflateStream.cs
- CfgSemanticTag.cs
- UriParserTemplates.cs
- CookieParameter.cs
- TextRangeBase.cs
- CommonXSendMessage.cs
- PaintEvent.cs
- FileSystemEventArgs.cs
- DataGridViewDesigner.cs
- GlobalizationAssembly.cs
- BitmapCodecInfoInternal.cs
- TraceSwitch.cs
- LocalBuilder.cs
- DecimalAnimationUsingKeyFrames.cs
- PlatformCulture.cs
- TransformedBitmap.cs
- FocusManager.cs
- WebPartExportVerb.cs
- BaseCollection.cs
- EntityDataSourceColumn.cs
- documentsequencetextview.cs
- CombinedGeometry.cs
- XsltLoader.cs
- FormViewDeleteEventArgs.cs
- KeyGestureConverter.cs
- TraceProvider.cs
- HttpCachePolicyWrapper.cs
- ValidationError.cs
- ThaiBuddhistCalendar.cs
- WindowsEditBoxRange.cs
- DataGridViewRowConverter.cs
- BamlLocalizableResource.cs
- Debug.cs
- ConfigPathUtility.cs
- ResourceIDHelper.cs
- TextComposition.cs
- InfoCardMasterKey.cs
- DataControlImageButton.cs
- ILGenerator.cs
- InputLanguage.cs
- MouseButton.cs
- ValueSerializerAttribute.cs
- RawStylusInputCustomData.cs
- ReliableOutputConnection.cs
- SafeMarshalContext.cs
- RegexCapture.cs
- XNodeNavigator.cs
- MaterialCollection.cs
- EntityCommandExecutionException.cs
- AsymmetricSignatureFormatter.cs
- SafeNativeMethods.cs
- SmtpNegotiateAuthenticationModule.cs
- ChangeDirector.cs
- ProviderUtil.cs
- JsonFormatGeneratorStatics.cs
- StringCollection.cs
- ServiceReference.cs
- DataGridViewIntLinkedList.cs
- XsdBuildProvider.cs
- GridViewRow.cs
- BooleanExpr.cs
- TraceHwndHost.cs
- ObjectDataSourceSelectingEventArgs.cs
- XmlNavigatorFilter.cs
- DocumentXmlWriter.cs
- SystemBrushes.cs
- Timer.cs
- PipelineModuleStepContainer.cs
- GetReadStreamResult.cs
- ElapsedEventArgs.cs
- HwndKeyboardInputProvider.cs
- WmiInstallComponent.cs
- KeyboardDevice.cs
- ComponentManagerBroker.cs
- CacheForPrimitiveTypes.cs