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
- SafeNativeMethodsOther.cs
- SystemResourceKey.cs
- DBNull.cs
- Label.cs
- DataAdapter.cs
- Transform.cs
- DataGridViewCellStateChangedEventArgs.cs
- Site.cs
- StructuralObject.cs
- WindowsFormsHost.cs
- ItemList.cs
- DoubleCollection.cs
- Frame.cs
- HashAlgorithm.cs
- SystemDiagnosticsSection.cs
- CompositeControl.cs
- IntranetCredentialPolicy.cs
- DataTablePropertyDescriptor.cs
- LeaseManager.cs
- StylusPointPropertyInfo.cs
- ErrorProvider.cs
- EmptyElement.cs
- DbReferenceCollection.cs
- CommonServiceBehaviorElement.cs
- WmlControlAdapter.cs
- DeflateEmulationStream.cs
- Decoder.cs
- EntityDataSourceWrapperCollection.cs
- InternalDispatchObject.cs
- WinEventQueueItem.cs
- CheckBoxPopupAdapter.cs
- HttpClientChannel.cs
- SqlMetaData.cs
- DatatypeImplementation.cs
- SubMenuStyleCollection.cs
- ConfigurationProviderException.cs
- LogicalExpr.cs
- DynamicDiscoveryDocument.cs
- DependencyPropertyHelper.cs
- ConfigurationLocation.cs
- UIElementAutomationPeer.cs
- OdbcEnvironmentHandle.cs
- ScriptingAuthenticationServiceSection.cs
- Table.cs
- SystemResourceHost.cs
- HttpResponse.cs
- RenderingBiasValidation.cs
- MembershipValidatePasswordEventArgs.cs
- InheritedPropertyChangedEventArgs.cs
- VariableModifiersHelper.cs
- TargetControlTypeCache.cs
- IDispatchConstantAttribute.cs
- DocumentAutomationPeer.cs
- ToolConsole.cs
- AnimatedTypeHelpers.cs
- DragDeltaEventArgs.cs
- X509ChainElement.cs
- CompilerCollection.cs
- FixedSOMContainer.cs
- SimpleApplicationHost.cs
- TemplateXamlParser.cs
- ApplicationHost.cs
- DrawingAttributes.cs
- MatrixValueSerializer.cs
- _ListenerResponseStream.cs
- DocumentSequenceHighlightLayer.cs
- HeaderUtility.cs
- SqlPersonalizationProvider.cs
- ObjectStateFormatter.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- RegexParser.cs
- Slider.cs
- State.cs
- TrackingProfile.cs
- RsaSecurityTokenAuthenticator.cs
- StringFormat.cs
- ConnectionsZoneAutoFormat.cs
- OleDbConnectionInternal.cs
- RectValueSerializer.cs
- WebReferenceCollection.cs
- BitmapImage.cs
- AssemblyCollection.cs
- WebPartHeaderCloseVerb.cs
- TableItemPattern.cs
- ReaderWriterLockWrapper.cs
- TraceRecords.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- RoutedEventArgs.cs
- ConfigXmlReader.cs
- DataGridItemCollection.cs
- XmlAttributes.cs
- Deflater.cs
- ZoneIdentityPermission.cs
- DefaultBinder.cs
- PeerResolverMode.cs
- SecurityElement.cs
- FileLoadException.cs
- WindowsPrincipal.cs
- RuleConditionDialog.Designer.cs
- CancellationTokenRegistration.cs