Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CommonUI / System / Drawing / Design / PaintValueEventArgs.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NumericUpDownAcceleration.cs
- EntityContainerRelationshipSetEnd.cs
- UpdatePanelTrigger.cs
- OuterGlowBitmapEffect.cs
- OutOfProcStateClientManager.cs
- DocumentScope.cs
- TextEmbeddedObject.cs
- EntityClassGenerator.cs
- WebAdminConfigurationHelper.cs
- SymbolTable.cs
- NumberFormatInfo.cs
- OutputCacheModule.cs
- PreloadedPackages.cs
- DataObjectEventArgs.cs
- CodeLinePragma.cs
- PackWebRequest.cs
- ClrProviderManifest.cs
- Win32Native.cs
- CellPartitioner.cs
- TryCatch.cs
- HtmlWindow.cs
- LoginDesignerUtil.cs
- ApplicationContext.cs
- PageClientProxyGenerator.cs
- HiddenField.cs
- ComUdtElement.cs
- LinkArea.cs
- GraphicsPath.cs
- ElementMarkupObject.cs
- regiisutil.cs
- DtdParser.cs
- EntityContainer.cs
- InsufficientMemoryException.cs
- ChannelBinding.cs
- XPathAxisIterator.cs
- StandardOleMarshalObject.cs
- HitTestParameters3D.cs
- ThumbAutomationPeer.cs
- ToolStripTemplateNode.cs
- ObjRef.cs
- SystemIcons.cs
- OdbcConnectionString.cs
- KeyValueInternalCollection.cs
- ListViewGroupConverter.cs
- GridSplitter.cs
- ComboBox.cs
- ExpressionConverter.cs
- PropertyToken.cs
- InstanceContext.cs
- Application.cs
- SplitterPanel.cs
- SqlCommand.cs
- ConstructorBuilder.cs
- SoapEnumAttribute.cs
- XmlDataSourceNodeDescriptor.cs
- DataGridColumnFloatingHeader.cs
- GeometryHitTestParameters.cs
- SystemFonts.cs
- BinHexEncoder.cs
- DataGridViewCellLinkedList.cs
- AttributeAction.cs
- ComponentRenameEvent.cs
- QilChoice.cs
- BmpBitmapEncoder.cs
- SiteMapPathDesigner.cs
- MetafileEditor.cs
- Span.cs
- XmlSchemaInclude.cs
- GridViewItemAutomationPeer.cs
- ElementsClipboardData.cs
- GeneralTransform2DTo3D.cs
- MimePart.cs
- RewritingProcessor.cs
- UdpDiscoveryEndpointProvider.cs
- SimpleType.cs
- MessageContractAttribute.cs
- SQLDecimalStorage.cs
- CachingHintValidation.cs
- ErrorView.xaml.cs
- DecimalConverter.cs
- WindowsButton.cs
- PolyLineSegment.cs
- MimeMapping.cs
- MatrixAnimationUsingKeyFrames.cs
- SmtpSection.cs
- CacheModeValueSerializer.cs
- PropertyGridEditorPart.cs
- TypeToken.cs
- Lookup.cs
- SocketException.cs
- messageonlyhwndwrapper.cs
- HtmlInputFile.cs
- ObjectPersistData.cs
- TableSectionStyle.cs
- FixedSOMImage.cs
- Transform3DGroup.cs
- IndentedTextWriter.cs
- ViewRendering.cs
- ProtocolsConfiguration.cs
- TypeExtensions.cs