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
- XmlElementCollection.cs
- BitmapEffectDrawingContextWalker.cs
- XmlObjectSerializerContext.cs
- ByteAnimationBase.cs
- FrugalList.cs
- DataControlCommands.cs
- DecimalAnimationUsingKeyFrames.cs
- TextSearch.cs
- DateTime.cs
- XmlWrappingReader.cs
- SQLUtility.cs
- MarkupExtensionParser.cs
- RuntimeCompatibilityAttribute.cs
- ErrorFormatterPage.cs
- PageTheme.cs
- WebPartConnectVerb.cs
- TextChange.cs
- XmlImplementation.cs
- HyperLink.cs
- SafeThemeHandle.cs
- __ComObject.cs
- MessageUtil.cs
- SendMailErrorEventArgs.cs
- GiveFeedbackEvent.cs
- FlowNode.cs
- LoginCancelEventArgs.cs
- SecurityHeaderElementInferenceEngine.cs
- Blend.cs
- InheritanceContextChangedEventManager.cs
- ProxyWebPartManager.cs
- ClientSideQueueItem.cs
- PropertyChangedEventManager.cs
- UxThemeWrapper.cs
- NativeMethodsCLR.cs
- PointLight.cs
- NotSupportedException.cs
- ComponentSerializationService.cs
- EnumMemberAttribute.cs
- X509CertificateRecipientClientCredential.cs
- XmlSerializerSection.cs
- LogArchiveSnapshot.cs
- OleDbInfoMessageEvent.cs
- Expression.cs
- JapaneseCalendar.cs
- ISAPIRuntime.cs
- GlyphsSerializer.cs
- Storyboard.cs
- SplineKeyFrames.cs
- MemoryStream.cs
- ProjectionCamera.cs
- returneventsaver.cs
- ElementHostAutomationPeer.cs
- HGlobalSafeHandle.cs
- NativeMethodsOther.cs
- OpenFileDialog.cs
- SiteOfOriginContainer.cs
- AddInServer.cs
- TextOutput.cs
- QueryResults.cs
- WebPartsPersonalization.cs
- PatternMatcher.cs
- XMLUtil.cs
- NativeCppClassAttribute.cs
- MediaCommands.cs
- InputReportEventArgs.cs
- AuthStoreRoleProvider.cs
- BinaryConverter.cs
- GridProviderWrapper.cs
- DataColumnMappingCollection.cs
- AppModelKnownContentFactory.cs
- SemanticBasicElement.cs
- processwaithandle.cs
- SessionSwitchEventArgs.cs
- FormCollection.cs
- ArglessEventHandlerProxy.cs
- DataGridViewAdvancedBorderStyle.cs
- ProxyAttribute.cs
- ToolStripStatusLabel.cs
- EntityCollection.cs
- ExtensionQuery.cs
- SqlStream.cs
- IdleTimeoutMonitor.cs
- WorkflowRuntimeElement.cs
- HashHelper.cs
- CounterNameConverter.cs
- SqlNodeAnnotation.cs
- OletxResourceManager.cs
- XmlDataFileEditor.cs
- MetadataPropertyvalue.cs
- ReliableSessionBindingElementImporter.cs
- SystemResourceKey.cs
- EmptyElement.cs
- ProxyElement.cs
- SimpleTextLine.cs
- DataGridViewColumnCollection.cs
- EdmComplexTypeAttribute.cs
- StorageFunctionMapping.cs
- FixedSOMPageElement.cs
- SQLInt32Storage.cs
- HttpHeaderCollection.cs