Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CommonUI / System / Drawing / Design / PaintValueEventArgs.cs / 1 / PaintValueEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Drawing.Design {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
///
///
/// This object is passed to UITypeEditor.PaintValue.
/// It contains all the information needed for the editor to
/// paint the given value, including the Rectangle in which
/// the drawing should be done, and the Graphics object with which the drawing
/// should be done.
///
[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")]
[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")]
public class PaintValueEventArgs : EventArgs {
private readonly ITypeDescriptorContext context;
private readonly object valueToPaint;
///
///
/// The graphics object with which the drawing should be done.
///
private readonly Graphics graphics;
///
///
/// The rectangle outlining the area in which the painting should be
/// done.
///
private readonly Rectangle bounds;
///
///
/// Creates a new PaintValueEventArgs with the given parameters.
///
public PaintValueEventArgs(ITypeDescriptorContext context, object value, Graphics graphics, Rectangle bounds) {
this.context = context;
this.valueToPaint = value;
this.graphics = graphics;
if (graphics == null)
throw new ArgumentNullException("graphics");
this.bounds = bounds;
}
///
///
/// The rectangle outlining the area in which the painting should be
/// done.
///
public Rectangle Bounds {
get {
return bounds;
}
}
///
///
/// ITypeDescriptorContext object for additional information about the context this value appears in.
///
public ITypeDescriptorContext Context {
get {
return context;
}
}
///
///
/// Graphics object with which painting should be done.
///
public Graphics Graphics {
get {
return graphics;
}
}
///
///
/// The value to paint.
///
public object Value {
get {
return valueToPaint;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XPathScanner.cs
- ColorAnimation.cs
- Scene3D.cs
- ProtocolElementCollection.cs
- XmlDataContract.cs
- MetadataStore.cs
- AdornerHitTestResult.cs
- Part.cs
- ObjectTypeMapping.cs
- FieldAccessException.cs
- complextypematerializer.cs
- OutputWindow.cs
- SQLDecimal.cs
- RoleManagerModule.cs
- OdbcEnvironment.cs
- Point4DValueSerializer.cs
- GridViewUpdateEventArgs.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- PointAnimationBase.cs
- PairComparer.cs
- CodeNamespaceCollection.cs
- WmlCommandAdapter.cs
- EnumerableValidator.cs
- Select.cs
- HtmlControlPersistable.cs
- MenuItemCollection.cs
- App.cs
- BitArray.cs
- HttpPostedFile.cs
- WebPartConnectionCollection.cs
- XhtmlBasicPageAdapter.cs
- AppDomainManager.cs
- OpCodes.cs
- EventDescriptor.cs
- DrawListViewColumnHeaderEventArgs.cs
- IntegerFacetDescriptionElement.cs
- ExpressionConverter.cs
- HostExecutionContextManager.cs
- ComponentRenameEvent.cs
- EqualityArray.cs
- OrderingExpression.cs
- BindValidator.cs
- BasePattern.cs
- CategoryNameCollection.cs
- Dump.cs
- DoubleLinkList.cs
- CorrelationService.cs
- EventItfInfo.cs
- QueryFunctions.cs
- Tablet.cs
- CapabilitiesUse.cs
- NetStream.cs
- ThemeDictionaryExtension.cs
- CodeEventReferenceExpression.cs
- Ipv6Element.cs
- Identity.cs
- SynchronizedInputPattern.cs
- CompositeScriptReference.cs
- CodeCommentStatementCollection.cs
- SqlAggregateChecker.cs
- SubpageParagraph.cs
- DoubleConverter.cs
- IDataContractSurrogate.cs
- ToolStripHighContrastRenderer.cs
- Graphics.cs
- ConfigurationProperty.cs
- IncomingWebResponseContext.cs
- RSATokenProvider.cs
- OperationFormatStyle.cs
- InternalConfigEventArgs.cs
- Debugger.cs
- OrCondition.cs
- ActivityExecutionWorkItem.cs
- IndentedWriter.cs
- XmlNamespaceDeclarationsAttribute.cs
- _ConnectionGroup.cs
- DropShadowEffect.cs
- WsdlImporterElementCollection.cs
- Math.cs
- NoClickablePointException.cs
- ListDataBindEventArgs.cs
- IListConverters.cs
- NoPersistScope.cs
- ThreadStaticAttribute.cs
- DynamicEntity.cs
- HashAlgorithm.cs
- StringFreezingAttribute.cs
- SpecialNameAttribute.cs
- UnionExpr.cs
- MetadataArtifactLoader.cs
- SignedXml.cs
- OpCellTreeNode.cs
- ClipboardData.cs
- SubpageParaClient.cs
- SocketSettings.cs
- NameSpaceExtractor.cs
- UserNameSecurityTokenProvider.cs
- AmbientValueAttribute.cs
- SystemNetHelpers.cs
- SplitterEvent.cs