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
- CompoundFileIOPermission.cs
- SchemaConstraints.cs
- HelloOperationCD1AsyncResult.cs
- ThemeDirectoryCompiler.cs
- CallContext.cs
- TriggerBase.cs
- GACMembershipCondition.cs
- PDBReader.cs
- _SingleItemRequestCache.cs
- EmbeddedObject.cs
- WrappedReader.cs
- WizardStepBase.cs
- KnownBoxes.cs
- FontStretches.cs
- EncodingTable.cs
- IndexerNameAttribute.cs
- BaseComponentEditor.cs
- MethodRental.cs
- TextSchema.cs
- ProcessHost.cs
- TokenBasedSet.cs
- ObjectDataSource.cs
- OneOfElement.cs
- Rotation3D.cs
- XhtmlBasicObjectListAdapter.cs
- InstanceCollisionException.cs
- GetIndexBinder.cs
- RadialGradientBrush.cs
- DataGridColumnHeaderAutomationPeer.cs
- ISessionStateStore.cs
- ByeOperation11AsyncResult.cs
- XmlSchemaGroupRef.cs
- TimelineGroup.cs
- XmlDocumentFragment.cs
- NativeMethods.cs
- ClickablePoint.cs
- Size3DValueSerializer.cs
- SQLBytes.cs
- PrintControllerWithStatusDialog.cs
- ValidationErrorInfo.cs
- SessionStateContainer.cs
- Compiler.cs
- AssemblyFilter.cs
- XmlParserContext.cs
- RuleRef.cs
- IndentedWriter.cs
- loginstatus.cs
- X509CertificateCollection.cs
- Helpers.cs
- PageThemeCodeDomTreeGenerator.cs
- StylusEventArgs.cs
- AutoGeneratedFieldProperties.cs
- SapiInterop.cs
- EventItfInfo.cs
- SmtpReplyReaderFactory.cs
- AnnotationObservableCollection.cs
- SpeakCompletedEventArgs.cs
- ColumnResizeUndoUnit.cs
- DuplicateDetector.cs
- AnimatedTypeHelpers.cs
- SHA512Managed.cs
- Int64Storage.cs
- HostingEnvironment.cs
- DropShadowEffect.cs
- ConnectionPoint.cs
- UIElementParagraph.cs
- SpellerHighlightLayer.cs
- SimpleMailWebEventProvider.cs
- DocumentScope.cs
- ModelPropertyImpl.cs
- ResourceBinder.cs
- StateMachine.cs
- WebPartDisplayModeCollection.cs
- CellTreeNode.cs
- ReachDocumentPageSerializerAsync.cs
- HtmlLink.cs
- SchemaImporter.cs
- XmlIgnoreAttribute.cs
- TextDecoration.cs
- StatusBarDrawItemEvent.cs
- BitmapData.cs
- ComponentResourceKey.cs
- Point3DValueSerializer.cs
- ControlCachePolicy.cs
- ApplicationHost.cs
- RIPEMD160.cs
- ImplicitInputBrush.cs
- Main.cs
- ContentHostHelper.cs
- PageRequestManager.cs
- HttpContext.cs
- ToolStripItemEventArgs.cs
- DetailsViewPagerRow.cs
- AudioDeviceOut.cs
- DateTimeAutomationPeer.cs
- DateBoldEvent.cs
- WebPartHeaderCloseVerb.cs
- TokenCreationParameter.cs
- QilSortKey.cs
- CacheDict.cs