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
- DiscoveryDocumentSearchPattern.cs
- ConfigurationLockCollection.cs
- StrokeNodeEnumerator.cs
- EntityContainerEmitter.cs
- NextPreviousPagerField.cs
- MemberDescriptor.cs
- RelationshipEndCollection.cs
- SmiEventSink.cs
- VirtualizingStackPanel.cs
- UserControl.cs
- ClrPerspective.cs
- SelectionItemProviderWrapper.cs
- GC.cs
- filewebrequest.cs
- HScrollBar.cs
- ProjectionCamera.cs
- RoutedEventHandlerInfo.cs
- CustomValidator.cs
- TableRow.cs
- SpecialTypeDataContract.cs
- ComplexObject.cs
- LowerCaseStringConverter.cs
- NumericUpDownAcceleration.cs
- RtfToXamlLexer.cs
- HasCopySemanticsAttribute.cs
- SystemEvents.cs
- HybridDictionary.cs
- SimpleMailWebEventProvider.cs
- DataGridColumn.cs
- DataControlLinkButton.cs
- SqlDataSourceSelectingEventArgs.cs
- SqlUtil.cs
- COM2ComponentEditor.cs
- TabletDevice.cs
- IssuanceLicense.cs
- CorruptStoreException.cs
- AutomationElement.cs
- SelectionHighlightInfo.cs
- XamlSerializationHelper.cs
- NameTable.cs
- ServicesSection.cs
- ActionItem.cs
- XmlSchemaChoice.cs
- ToolStripPanelRow.cs
- ManualResetEvent.cs
- ClusterSafeNativeMethods.cs
- ObjectFullSpanRewriter.cs
- ServiceEndpointElementCollection.cs
- CopyAction.cs
- DetailsViewRowCollection.cs
- ClientEventManager.cs
- MessageLogger.cs
- BaseCodePageEncoding.cs
- GZipDecoder.cs
- FixedSOMContainer.cs
- XmlElement.cs
- WebColorConverter.cs
- LoadedOrUnloadedOperation.cs
- ParseHttpDate.cs
- ControlIdConverter.cs
- Comparer.cs
- TracingConnection.cs
- mansign.cs
- ListDictionaryInternal.cs
- DataGridViewLinkColumn.cs
- LogWriteRestartAreaAsyncResult.cs
- ThicknessAnimationBase.cs
- Blend.cs
- ModelPropertyCollectionImpl.cs
- ContactManager.cs
- XsltLibrary.cs
- BrowserDefinitionCollection.cs
- METAHEADER.cs
- DES.cs
- CompiledWorkflowDefinitionContext.cs
- Pointer.cs
- EmptyReadOnlyDictionaryInternal.cs
- ControlAdapter.cs
- LocatorPart.cs
- RequestCachingSection.cs
- PageRequestManager.cs
- UserPersonalizationStateInfo.cs
- MediaPlayerState.cs
- RMPermissions.cs
- Nullable.cs
- TextBoxAutoCompleteSourceConverter.cs
- MarkupCompiler.cs
- SoapMessage.cs
- AttributeQuery.cs
- ProviderConnectionPointCollection.cs
- JournalNavigationScope.cs
- ConstraintEnumerator.cs
- DataGridViewCellCancelEventArgs.cs
- XmlSchemaSimpleContentRestriction.cs
- EdgeModeValidation.cs
- X509SecurityToken.cs
- PositiveTimeSpanValidator.cs
- SpeechEvent.cs
- NavigateEvent.cs
- SimpleBitVector32.cs