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
- PrinterResolution.cs
- ProxyFragment.cs
- ComboBoxRenderer.cs
- SectionUpdates.cs
- _AutoWebProxyScriptWrapper.cs
- ResourceType.cs
- AppSettingsExpressionEditor.cs
- ListBindingConverter.cs
- RowCache.cs
- RequestSecurityTokenSerializer.cs
- BufferedReadStream.cs
- SqlRecordBuffer.cs
- HttpGetProtocolImporter.cs
- SchemaTableColumn.cs
- CheckableControlBaseAdapter.cs
- QueryRelOp.cs
- OutputCacheSettings.cs
- InvalidDataException.cs
- SafeFileMappingHandle.cs
- CreateUserWizardStep.cs
- EntityDataSourceSelectingEventArgs.cs
- Range.cs
- DbConnectionStringCommon.cs
- Path.cs
- printdlgexmarshaler.cs
- CatalogPart.cs
- DataGridViewRowStateChangedEventArgs.cs
- SizeAnimationClockResource.cs
- FontSource.cs
- FreezableOperations.cs
- PageCache.cs
- ExtentJoinTreeNode.cs
- FileUpload.cs
- SymmetricKey.cs
- SatelliteContractVersionAttribute.cs
- StylusEditingBehavior.cs
- TreeNodeCollection.cs
- GregorianCalendar.cs
- ToolStripKeyboardHandlingService.cs
- XmlQualifiedNameTest.cs
- WebPartConnectionsCancelEventArgs.cs
- DbParameterHelper.cs
- NullExtension.cs
- ProfileGroupSettingsCollection.cs
- EntityParameter.cs
- MsmqAuthenticationMode.cs
- SerializationInfo.cs
- GridItemProviderWrapper.cs
- CrossSiteScriptingValidation.cs
- TreeViewItemAutomationPeer.cs
- RangeValueProviderWrapper.cs
- DateTimeValueSerializerContext.cs
- ButtonColumn.cs
- FieldMetadata.cs
- DataGrid.cs
- DeviceSpecificChoiceCollection.cs
- FixedNode.cs
- Tuple.cs
- SQLInt16.cs
- Tile.cs
- LocalizedNameDescriptionPair.cs
- ToolBarButton.cs
- SetIndexBinder.cs
- CodeDirectoryCompiler.cs
- Propagator.cs
- DataSourceConverter.cs
- SerializationSectionGroup.cs
- _MultipleConnectAsync.cs
- RegistryKey.cs
- ConfigXmlAttribute.cs
- PerformanceCounterNameAttribute.cs
- RC2.cs
- RpcAsyncResult.cs
- ParserStreamGeometryContext.cs
- OdbcEnvironment.cs
- BoundField.cs
- InkCanvasSelection.cs
- ThemeDictionaryExtension.cs
- RegexRunnerFactory.cs
- WebServiceParameterData.cs
- DropSource.cs
- KeyValueConfigurationCollection.cs
- DataProtectionSecurityStateEncoder.cs
- Compilation.cs
- HtmlTableCell.cs
- DataRow.cs
- XmlObjectSerializerReadContextComplexJson.cs
- XPathScanner.cs
- HierarchicalDataTemplate.cs
- CaseStatement.cs
- EdmItemCollection.cs
- HttpCapabilitiesEvaluator.cs
- PageEventArgs.cs
- ProtocolsConfigurationHandler.cs
- PathGradientBrush.cs
- CodeAccessPermission.cs
- DataMemberAttribute.cs
- SHA256Managed.cs
- Decimal.cs
- PropertyContainer.cs