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
- TypeBuilder.cs
- TypeUsageBuilder.cs
- ServiceHttpModule.cs
- XMLDiffLoader.cs
- CodeSubDirectoriesCollection.cs
- ComPlusThreadInitializer.cs
- CrossAppDomainChannel.cs
- DbDataAdapter.cs
- WSDualHttpSecurity.cs
- WebBrowserPermission.cs
- MachinePropertyVariants.cs
- CellPartitioner.cs
- SubMenuStyle.cs
- DataGridViewRowHeaderCell.cs
- InvalidWorkflowException.cs
- Internal.cs
- DesignerForm.cs
- ClearCollection.cs
- ConfigXmlAttribute.cs
- Marshal.cs
- BooleanSwitch.cs
- HashHelper.cs
- Animatable.cs
- BindingMAnagerBase.cs
- Form.cs
- CopyEncoder.cs
- HostedTransportConfigurationManager.cs
- TextRange.cs
- ResourceSetExpression.cs
- IgnoreFileBuildProvider.cs
- TagNameToTypeMapper.cs
- CopyNodeSetAction.cs
- SizeChangedInfo.cs
- EntityViewGenerator.cs
- UITypeEditors.cs
- LoginCancelEventArgs.cs
- GenericUriParser.cs
- Int64AnimationBase.cs
- ComUdtElement.cs
- DataTableClearEvent.cs
- ModuleBuilderData.cs
- _DisconnectOverlappedAsyncResult.cs
- CounterCreationDataCollection.cs
- WebPartVerb.cs
- ParameterCollectionEditorForm.cs
- CollectionContainer.cs
- Line.cs
- ControlAdapter.cs
- ToolStripSystemRenderer.cs
- MetadataArtifactLoaderCompositeResource.cs
- ContainsRowNumberChecker.cs
- HttpStaticObjectsCollectionBase.cs
- WinFormsUtils.cs
- AlternateViewCollection.cs
- DataSourceHelper.cs
- PropertyDescriptor.cs
- TextSearch.cs
- MenuItemStyleCollectionEditor.cs
- ConnectionManagementElementCollection.cs
- LOSFormatter.cs
- BypassElementCollection.cs
- ValidationHelper.cs
- Icon.cs
- MeasurementDCInfo.cs
- Animatable.cs
- NameTable.cs
- MsmqIntegrationSecurity.cs
- IPAddress.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SrgsElementList.cs
- xmlformatgeneratorstatics.cs
- BuildResult.cs
- TextSearch.cs
- InteropBitmapSource.cs
- DataListItemCollection.cs
- FileChangesMonitor.cs
- SmtpCommands.cs
- ItemTypeToolStripMenuItem.cs
- DocumentOrderQuery.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- SpStreamWrapper.cs
- SerializationObjectManager.cs
- _RequestCacheProtocol.cs
- CqlIdentifiers.cs
- SystemResourceHost.cs
- TrackBarRenderer.cs
- DataGridRowsPresenter.cs
- CustomAttributeBuilder.cs
- ParserContext.cs
- SecureStringHasher.cs
- Drawing.cs
- EventLogEntry.cs
- TextViewSelectionProcessor.cs
- ExpressionBindingCollection.cs
- ClientBuildManager.cs
- X509CertificateInitiatorServiceCredential.cs
- DependencyPropertyChangedEventArgs.cs
- diagnosticsswitches.cs
- BinaryMethodMessage.cs
- XmlSchemaObject.cs