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
- CommandField.cs
- Function.cs
- FullTextLine.cs
- BasicHttpMessageCredentialType.cs
- StatusBar.cs
- RectConverter.cs
- StandardMenuStripVerb.cs
- SmtpMail.cs
- MarkupExtensionReturnTypeAttribute.cs
- Size.cs
- DataBindingExpressionBuilder.cs
- DependsOnAttribute.cs
- Adorner.cs
- X509Utils.cs
- GroupStyle.cs
- MetafileHeader.cs
- WebMessageEncoderFactory.cs
- UserControl.cs
- TargetPerspective.cs
- RawMouseInputReport.cs
- HiddenFieldDesigner.cs
- NumberFormatInfo.cs
- TreeNodeStyleCollection.cs
- QilGenerator.cs
- LabelEditEvent.cs
- PathSegmentCollection.cs
- BStrWrapper.cs
- ComponentManagerBroker.cs
- StateBag.cs
- ServicePointManager.cs
- AuthStoreRoleProvider.cs
- XmlBinaryReader.cs
- XamlTreeBuilderBamlRecordWriter.cs
- DbConnectionHelper.cs
- IncomingWebResponseContext.cs
- FontDifferentiator.cs
- UnsafeNativeMethods.cs
- _BufferOffsetSize.cs
- HwndAppCommandInputProvider.cs
- DynamicDataExtensions.cs
- PropertyPath.cs
- WindowsEditBox.cs
- SrgsElementList.cs
- DSASignatureFormatter.cs
- ComplexLine.cs
- XmlNavigatorStack.cs
- SqlTopReducer.cs
- DebugHandleTracker.cs
- DllNotFoundException.cs
- DataSourceHelper.cs
- Rect.cs
- ProfileSettingsCollection.cs
- AsyncSerializedWorker.cs
- InputLanguageProfileNotifySink.cs
- _LoggingObject.cs
- CompiledIdentityConstraint.cs
- DisableDpiAwarenessAttribute.cs
- HttpListenerRequest.cs
- ExpressionLexer.cs
- DatagramAdapter.cs
- FixedSOMSemanticBox.cs
- WizardStepBase.cs
- TargetParameterCountException.cs
- XmlSchemaSimpleTypeRestriction.cs
- OperationFormatUse.cs
- MdbDataFileEditor.cs
- DataGridViewCellEventArgs.cs
- TimelineClockCollection.cs
- WebHeaderCollection.cs
- CodeDOMUtility.cs
- MessageQueueCriteria.cs
- DesignerWithHeader.cs
- ThemeInfoAttribute.cs
- ProfileModule.cs
- MarkupObject.cs
- EncodingFallbackAwareXmlTextWriter.cs
- GroupItemAutomationPeer.cs
- OutputCacheSettingsSection.cs
- PropertyMapper.cs
- ReferencedAssembly.cs
- DateTimeOffsetConverter.cs
- AQNBuilder.cs
- SqlConnectionPoolGroupProviderInfo.cs
- PriorityItem.cs
- CheckedPointers.cs
- COM2Properties.cs
- AnnotationResource.cs
- AssemblyBuilder.cs
- XmlCompatibilityReader.cs
- LayoutTableCell.cs
- XmlHierarchicalEnumerable.cs
- FtpWebRequest.cs
- DelegateHelpers.cs
- ProfileService.cs
- Size.cs
- Char.cs
- UIElementAutomationPeer.cs
- ListViewUpdateEventArgs.cs
- AspNetSynchronizationContext.cs
- XmlMemberMapping.cs