Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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.
//
//-----------------------------------------------------------------------------
/*
*/
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
- XmlObjectSerializerContext.cs
- FacetDescription.cs
- ETagAttribute.cs
- SocketCache.cs
- Rotation3DKeyFrameCollection.cs
- JsonWriter.cs
- SafeIUnknown.cs
- Environment.cs
- ContentValidator.cs
- WebConfigurationManager.cs
- ResponseStream.cs
- CheckBox.cs
- ClientTargetSection.cs
- CodePageEncoding.cs
- StreamSecurityUpgradeAcceptorBase.cs
- RoutedPropertyChangedEventArgs.cs
- Visual3D.cs
- SignatureGenerator.cs
- baseshape.cs
- FrameworkTemplate.cs
- HttpDictionary.cs
- DataGridViewDataConnection.cs
- Panel.cs
- SizeIndependentAnimationStorage.cs
- AsymmetricSignatureDeformatter.cs
- TableCellCollection.cs
- AutomationElement.cs
- EventListener.cs
- latinshape.cs
- HotSpotCollection.cs
- Debugger.cs
- Point3DAnimation.cs
- GridViewDeleteEventArgs.cs
- StylusSystemGestureEventArgs.cs
- StrongNameUtility.cs
- DetailsViewUpdateEventArgs.cs
- APCustomTypeDescriptor.cs
- ProcessModelInfo.cs
- RoleGroupCollection.cs
- FileVersionInfo.cs
- TableItemStyle.cs
- DocumentEventArgs.cs
- EmbeddedMailObjectsCollection.cs
- Roles.cs
- ServicePointManagerElement.cs
- ToolStripDropTargetManager.cs
- EntityDataSourceValidationException.cs
- ConfigurationLocation.cs
- BehaviorService.cs
- XmlLangPropertyAttribute.cs
- GroupQuery.cs
- FragmentNavigationEventArgs.cs
- ButtonFieldBase.cs
- DesignerSerializationVisibilityAttribute.cs
- ObjectMemberMapping.cs
- IItemContainerGenerator.cs
- MailAddressParser.cs
- OracleConnectionFactory.cs
- ItemMap.cs
- SqlDataSourceStatusEventArgs.cs
- HandoffBehavior.cs
- PathFigure.cs
- DescendentsWalker.cs
- ProfileParameter.cs
- Margins.cs
- DetailsViewModeEventArgs.cs
- WeakReferenceList.cs
- WebEventCodes.cs
- DataGridViewRowPrePaintEventArgs.cs
- GACIdentityPermission.cs
- PropertyFilter.cs
- ParallelForEach.cs
- InputGestureCollection.cs
- MethodImplAttribute.cs
- diagnosticsswitches.cs
- FrugalList.cs
- DataGridCell.cs
- CapabilitiesPattern.cs
- QueueProcessor.cs
- SqlPersonalizationProvider.cs
- MatrixStack.cs
- XmlSchemaCompilationSettings.cs
- TemplateManager.cs
- TextServicesDisplayAttribute.cs
- HandlerElement.cs
- SynchronousChannel.cs
- QilFactory.cs
- ColumnHeaderConverter.cs
- WmiPutTraceRecord.cs
- Quad.cs
- HttpConfigurationSystem.cs
- Win32SafeHandles.cs
- FormsAuthenticationEventArgs.cs
- PersistChildrenAttribute.cs
- DefaultMemberAttribute.cs
- MemoryPressure.cs
- WindowsContainer.cs
- ProjectionCamera.cs
- TreeNodeStyleCollectionEditor.cs
- OutputWindow.cs