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
- BaseUriHelper.cs
- EntityDescriptor.cs
- RadioButtonBaseAdapter.cs
- HandleScope.cs
- RenderContext.cs
- UnionExpr.cs
- ItemsControlAutomationPeer.cs
- SqlSelectStatement.cs
- ToolboxService.cs
- UntrustedRecipientException.cs
- _NegotiateClient.cs
- TimerElapsedEvenArgs.cs
- SafeProcessHandle.cs
- UserControlCodeDomTreeGenerator.cs
- UserPrincipalNameElement.cs
- ListBoxItemWrapperAutomationPeer.cs
- MessageSecurityOverHttp.cs
- DataKeyArray.cs
- IPAddress.cs
- ObjectListItem.cs
- LogRecordSequence.cs
- SingleResultAttribute.cs
- FixedSOMTableCell.cs
- ExpressionPrinter.cs
- HtmlShim.cs
- VerticalAlignConverter.cs
- Command.cs
- ISAPIRuntime.cs
- SocketCache.cs
- GenericFlowSwitchHelper.cs
- BitmapSizeOptions.cs
- ConfigUtil.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- IdentifierCollection.cs
- WindowManager.cs
- HtmlMeta.cs
- PropertyGrid.cs
- HatchBrush.cs
- SettingsSection.cs
- Random.cs
- FormViewModeEventArgs.cs
- ClientRolePrincipal.cs
- ContextStaticAttribute.cs
- Menu.cs
- MapPathBasedVirtualPathProvider.cs
- SafeRegistryHandle.cs
- ScriptingRoleServiceSection.cs
- WinEventQueueItem.cs
- MeshGeometry3D.cs
- ConditionalAttribute.cs
- InkCanvasInnerCanvas.cs
- GridToolTip.cs
- AnnotationAdorner.cs
- ActivityDesignerHighlighter.cs
- SQLStringStorage.cs
- SiteOfOriginPart.cs
- CalendarDay.cs
- RoutedPropertyChangedEventArgs.cs
- StylusPointPropertyUnit.cs
- CatalogPartChrome.cs
- AttributeEmitter.cs
- SimpleRecyclingCache.cs
- Wow64ConfigurationLoader.cs
- DiscreteKeyFrames.cs
- DayRenderEvent.cs
- BooleanAnimationUsingKeyFrames.cs
- WebHttpDispatchOperationSelectorData.cs
- HtmlTextArea.cs
- BinaryCommonClasses.cs
- log.cs
- X509Certificate.cs
- FileDetails.cs
- DrawingBrush.cs
- ProtocolElement.cs
- DataColumnMappingCollection.cs
- ByteStorage.cs
- ManipulationCompletedEventArgs.cs
- Memoizer.cs
- RealProxy.cs
- FormViewInsertEventArgs.cs
- BamlLocalizationDictionary.cs
- Attributes.cs
- FileAuthorizationModule.cs
- localization.cs
- AsyncCallback.cs
- ReturnValue.cs
- IndentTextWriter.cs
- ConnectionManagementElement.cs
- NTAccount.cs
- ButtonColumn.cs
- WebPartCancelEventArgs.cs
- ComponentTray.cs
- ElapsedEventArgs.cs
- TableSectionStyle.cs
- NewArray.cs
- GridViewEditEventArgs.cs
- DesignerForm.cs
- BuildResultCache.cs
- RepeatBehavior.cs
- ClientSession.cs