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
- ChannelBuilder.cs
- DependencyPropertyHelper.cs
- ProfileModule.cs
- DashStyle.cs
- ProjectionPruner.cs
- Window.cs
- SynchronizationContextHelper.cs
- DragCompletedEventArgs.cs
- ClientEventManager.cs
- Documentation.cs
- WebPartPersonalization.cs
- TextMetrics.cs
- ToolStripSeparatorRenderEventArgs.cs
- CopyOfAction.cs
- LeaseManager.cs
- LightweightCodeGenerator.cs
- externdll.cs
- WindowsSpinner.cs
- JournalNavigationScope.cs
- EntityChangedParams.cs
- MemoryRecordBuffer.cs
- SaveCardRequest.cs
- Glyph.cs
- COAUTHINFO.cs
- StartUpEventArgs.cs
- BaseDataList.cs
- CfgParser.cs
- RuntimeHelpers.cs
- SqlStream.cs
- Opcode.cs
- PropVariant.cs
- IPAddressCollection.cs
- XmlNullResolver.cs
- TypeInitializationException.cs
- Pen.cs
- WebPartManagerDesigner.cs
- EntityRecordInfo.cs
- PenThreadPool.cs
- FigureParagraph.cs
- TextRunCacheImp.cs
- OleDbConnectionFactory.cs
- DefaultProxySection.cs
- SafeEventLogReadHandle.cs
- ForEachAction.cs
- ComponentResourceKey.cs
- ToolboxComponentsCreatingEventArgs.cs
- ResourceIDHelper.cs
- ByteStream.cs
- Cursor.cs
- DeferredTextReference.cs
- SizeConverter.cs
- MethodToken.cs
- ConstructorBuilder.cs
- ModelVisual3D.cs
- ClientSession.cs
- UserCancellationException.cs
- XmlBinaryReader.cs
- ValidationErrorInfo.cs
- XPathNode.cs
- PeerNearMe.cs
- PresentationAppDomainManager.cs
- ResourceDescriptionAttribute.cs
- EpmHelper.cs
- ControlCollection.cs
- EnumerableCollectionView.cs
- ErrorHandler.cs
- SequenceDesigner.cs
- CommonDialog.cs
- ArgIterator.cs
- ExtentCqlBlock.cs
- ViewValidator.cs
- XmlAttribute.cs
- BasicHttpMessageSecurityElement.cs
- RuntimeIdentifierPropertyAttribute.cs
- PeerContact.cs
- CalendarDay.cs
- Convert.cs
- SplitterEvent.cs
- DesignerForm.cs
- AssemblyCollection.cs
- SafeNativeMethods.cs
- WebHttpDispatchOperationSelectorData.cs
- DesignerWithHeader.cs
- FocusManager.cs
- StorageAssociationSetMapping.cs
- BindingManagerDataErrorEventArgs.cs
- RenderDataDrawingContext.cs
- ListManagerBindingsCollection.cs
- translator.cs
- RC2CryptoServiceProvider.cs
- D3DImage.cs
- TreeNodeBinding.cs
- Italic.cs
- EncoderBestFitFallback.cs
- NavigationService.cs
- TaskSchedulerException.cs
- KnownTypes.cs
- NCryptSafeHandles.cs
- PrinterResolution.cs
- Binding.cs