Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / AmbientProperties.cs / 1305376 / AmbientProperties.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* Copyright (c) 1999, Microsoft Corporation. All Rights Reserved.
* Information Contained Herein is Proprietary and Confidential.
*/
namespace System.Windows.Forms {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Windows.Forms.Design;
using System.ComponentModel.Design;
using System.Drawing;
using Microsoft.Win32;
///
///
///
/// Provides ambient property values to top-level controls.
///
///
//
// NOTE: internally, this class does double duty as storage for Control's inherited properties.
public sealed class AmbientProperties {
// Public ambient properties
private Color backColor;
private Color foreColor;
private Cursor cursor;
private Font font;
///
///
///
/// Gets the ambient BackColor, or Color.Empty if there is none.
///
///
public Color BackColor {
get {
return backColor;
}
set {
backColor = value;
}
}
///
///
///
/// Gets the ambient BackColor, or null if there is none.
///
///
public Cursor Cursor {
get {
return cursor;
}
set {
cursor = value;
}
}
///
///
///
/// Gets the ambient Font, or null if there is none.
///
///
public Font Font {
get {
return font;
}
set {
font = value;
}
}
///
///
///
/// Gets the ambient ForeColor, or Color.Empty if there is none.
///
///
public Color ForeColor {
get {
return foreColor;
}
set {
foreColor = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* Copyright (c) 1999, Microsoft Corporation. All Rights Reserved.
* Information Contained Herein is Proprietary and Confidential.
*/
namespace System.Windows.Forms {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Windows.Forms.Design;
using System.ComponentModel.Design;
using System.Drawing;
using Microsoft.Win32;
///
///
///
/// Provides ambient property values to top-level controls.
///
///
//
// NOTE: internally, this class does double duty as storage for Control's inherited properties.
public sealed class AmbientProperties {
// Public ambient properties
private Color backColor;
private Color foreColor;
private Cursor cursor;
private Font font;
///
///
///
/// Gets the ambient BackColor, or Color.Empty if there is none.
///
///
public Color BackColor {
get {
return backColor;
}
set {
backColor = value;
}
}
///
///
///
/// Gets the ambient BackColor, or null if there is none.
///
///
public Cursor Cursor {
get {
return cursor;
}
set {
cursor = value;
}
}
///
///
///
/// Gets the ambient Font, or null if there is none.
///
///
public Font Font {
get {
return font;
}
set {
font = value;
}
}
///
///
///
/// Gets the ambient ForeColor, or Color.Empty if there is none.
///
///
public Color ForeColor {
get {
return foreColor;
}
set {
foreColor = value;
}
}
}
}
// 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
- Attachment.cs
- KeyFrames.cs
- PropertyStore.cs
- PageClientProxyGenerator.cs
- AspNetSynchronizationContext.cs
- SqlClientPermission.cs
- ThemeDirectoryCompiler.cs
- StrokeFIndices.cs
- FlowDocumentScrollViewer.cs
- ClientRuntimeConfig.cs
- SequentialOutput.cs
- HtmlEmptyTagControlBuilder.cs
- AsymmetricSignatureFormatter.cs
- MiniModule.cs
- RoleGroupCollection.cs
- SerializerWriterEventHandlers.cs
- XmlAttributeCollection.cs
- OrderByLifter.cs
- HostingEnvironmentWrapper.cs
- QueryCacheKey.cs
- XmlDataCollection.cs
- RtfToken.cs
- QuaternionConverter.cs
- PerfService.cs
- CodeNamespaceImport.cs
- TargetInvocationException.cs
- ForEachAction.cs
- Random.cs
- SoapWriter.cs
- GridViewDeleteEventArgs.cs
- EffectiveValueEntry.cs
- HitTestResult.cs
- SetIterators.cs
- StatusBarPanelClickEvent.cs
- XPathDocumentIterator.cs
- IntSecurity.cs
- SimpleType.cs
- DataGridViewAccessibleObject.cs
- SQLBoolean.cs
- TrackBarDesigner.cs
- ObjectViewQueryResultData.cs
- ToolStripDropTargetManager.cs
- CFGGrammar.cs
- BooleanKeyFrameCollection.cs
- FileNotFoundException.cs
- PerformanceCounterPermission.cs
- XmlDictionary.cs
- WebPartsPersonalizationAuthorization.cs
- HashMembershipCondition.cs
- Trace.cs
- OuterGlowBitmapEffect.cs
- TypedDataSetSchemaImporterExtension.cs
- ClientOptions.cs
- XmlSchemaValidator.cs
- BinHexDecoder.cs
- PersistencePipeline.cs
- ProxyManager.cs
- DataObject.cs
- SQLInt32Storage.cs
- ConfigurationManagerInternalFactory.cs
- ServiceOperation.cs
- SafePEFileHandle.cs
- AssemblyInfo.cs
- CngProvider.cs
- FixedDocumentSequencePaginator.cs
- Char.cs
- ListControlConvertEventArgs.cs
- StreamUpdate.cs
- ResolveDuplexCD1AsyncResult.cs
- DataObjectCopyingEventArgs.cs
- ProcessDesigner.cs
- WebException.cs
- XPathParser.cs
- KerberosSecurityTokenAuthenticator.cs
- ObjectIDGenerator.cs
- EnvironmentPermission.cs
- CheckBoxBaseAdapter.cs
- UserControlBuildProvider.cs
- DataControlField.cs
- WebPartMinimizeVerb.cs
- EllipticalNodeOperations.cs
- SessionState.cs
- VectorCollection.cs
- XmlElementAttributes.cs
- PixelFormatConverter.cs
- ReadOnlyActivityGlyph.cs
- FactoryMaker.cs
- SamlConstants.cs
- DesignTimeVisibleAttribute.cs
- SimpleApplicationHost.cs
- ListView.cs
- SimpleFieldTemplateUserControl.cs
- NameGenerator.cs
- FloaterBaseParaClient.cs
- FormsAuthentication.cs
- DataGridViewCheckBoxCell.cs
- CaseStatementProjectedSlot.cs
- FixedPageAutomationPeer.cs
- TraceHandlerErrorFormatter.cs
- ClaimComparer.cs