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
- Span.cs
- SqlBinder.cs
- SqlVisitor.cs
- SubtreeProcessor.cs
- JavaScriptObjectDeserializer.cs
- LinqDataSourceDeleteEventArgs.cs
- DependencyPropertyKey.cs
- GPPOINT.cs
- OleDbRowUpdatedEvent.cs
- DescendantBaseQuery.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- ForwardPositionQuery.cs
- CommandEventArgs.cs
- PropertyTabChangedEvent.cs
- TextLine.cs
- ExecutionEngineException.cs
- ConsumerConnectionPoint.cs
- InheritanceContextHelper.cs
- CheckBoxAutomationPeer.cs
- GeneratedCodeAttribute.cs
- hwndwrapper.cs
- ScrollBar.cs
- DocumentPage.cs
- DesignerDataStoredProcedure.cs
- References.cs
- TransportSecurityHelpers.cs
- TdsParser.cs
- PolyBezierSegmentFigureLogic.cs
- ApplicationContext.cs
- WebServiceHandlerFactory.cs
- CommentEmitter.cs
- DbProviderFactories.cs
- TypeDescriptionProviderAttribute.cs
- LicenseContext.cs
- DashStyle.cs
- RecommendedAsConfigurableAttribute.cs
- SmtpMail.cs
- EpmSyndicationContentSerializer.cs
- DataSpaceManager.cs
- XmlSchemaAnyAttribute.cs
- ServiceOperation.cs
- XPathSingletonIterator.cs
- ControlCollection.cs
- PrimitiveCodeDomSerializer.cs
- ApplicationFileCodeDomTreeGenerator.cs
- Utils.cs
- CompareInfo.cs
- TableHeaderCell.cs
- SQLByteStorage.cs
- bidPrivateBase.cs
- PageWrapper.cs
- RichTextBox.cs
- HttpCapabilitiesEvaluator.cs
- DataComponentGenerator.cs
- FontNamesConverter.cs
- SemanticValue.cs
- ErrorFormatter.cs
- Rijndael.cs
- CodeExpressionCollection.cs
- FontDialog.cs
- OAVariantLib.cs
- AuthenticationModuleElement.cs
- JsonClassDataContract.cs
- SizeAnimation.cs
- FileUpload.cs
- MaskInputRejectedEventArgs.cs
- BindUriHelper.cs
- StringValidatorAttribute.cs
- ExecutedRoutedEventArgs.cs
- Expression.cs
- CheckBoxRenderer.cs
- DispatcherHooks.cs
- GrammarBuilderPhrase.cs
- EntityParameter.cs
- PrivilegeNotHeldException.cs
- DriveInfo.cs
- ObjectConverter.cs
- BinHexDecoder.cs
- TabRenderer.cs
- _LoggingObject.cs
- TakeOrSkipWhileQueryOperator.cs
- BufferedReadStream.cs
- UnsafeNativeMethods.cs
- Configuration.cs
- TransformerTypeCollection.cs
- recordstatefactory.cs
- FlowDocumentReaderAutomationPeer.cs
- isolationinterop.cs
- ClientConvert.cs
- Rotation3DKeyFrameCollection.cs
- CollectionViewGroupInternal.cs
- FixedBufferAttribute.cs
- BinaryObjectReader.cs
- CodeSnippetCompileUnit.cs
- MoveSizeWinEventHandler.cs
- NativeMethods.cs
- SQLBoolean.cs
- OleDbConnectionInternal.cs
- MenuStrip.cs
- ServiceXNameTypeConverter.cs