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
- ObfuscateAssemblyAttribute.cs
- CodeExpressionStatement.cs
- CompilerGeneratedAttribute.cs
- PackageDigitalSignatureManager.cs
- SpStreamWrapper.cs
- Scene3D.cs
- BindingOperations.cs
- SelectionPatternIdentifiers.cs
- MediaSystem.cs
- ReflectionHelper.cs
- ExtensibleClassFactory.cs
- JsonEnumDataContract.cs
- FileSystemEnumerable.cs
- Helpers.cs
- ComponentSerializationService.cs
- _AcceptOverlappedAsyncResult.cs
- SafeNativeMethods.cs
- SettingsBase.cs
- SerializationInfoEnumerator.cs
- TypeReference.cs
- Knowncolors.cs
- NativeCppClassAttribute.cs
- TextRunProperties.cs
- DBSqlParserColumnCollection.cs
- SystemKeyConverter.cs
- mda.cs
- xml.cs
- ExtenderProvidedPropertyAttribute.cs
- webeventbuffer.cs
- URLAttribute.cs
- DrawingContextWalker.cs
- _ContextAwareResult.cs
- BlurEffect.cs
- TabControlToolboxItem.cs
- XmlEventCache.cs
- DataSourceGroupCollection.cs
- XdrBuilder.cs
- InvalidChannelBindingException.cs
- ClientUrlResolverWrapper.cs
- TextAutomationPeer.cs
- LayoutEvent.cs
- GlyphShapingProperties.cs
- DateTimeOffsetConverter.cs
- ISessionStateStore.cs
- DataErrorValidationRule.cs
- StylusButton.cs
- SqlNotificationRequest.cs
- AsmxEndpointPickerExtension.cs
- ClosableStream.cs
- ChannelHandler.cs
- EndpointInfo.cs
- NativeMethods.cs
- Clipboard.cs
- RepeatButton.cs
- URI.cs
- FileUtil.cs
- NetCodeGroup.cs
- DrawListViewColumnHeaderEventArgs.cs
- DefaultAsyncDataDispatcher.cs
- TemplateControlCodeDomTreeGenerator.cs
- ValueChangedEventManager.cs
- DataGridRow.cs
- xmlfixedPageInfo.cs
- SqlResolver.cs
- ConstructorNeedsTagAttribute.cs
- CFStream.cs
- ScriptingScriptResourceHandlerSection.cs
- ObjectView.cs
- WebRequestModuleElementCollection.cs
- ExpressionBindings.cs
- ToolboxItemAttribute.cs
- RegexGroupCollection.cs
- LicenseProviderAttribute.cs
- UInt64.cs
- DesignerCategoryAttribute.cs
- XmlDictionaryWriter.cs
- AnonymousIdentificationModule.cs
- XmlSchemaChoice.cs
- LookupBindingPropertiesAttribute.cs
- SqlConnectionHelper.cs
- EntityViewGenerationConstants.cs
- Point4D.cs
- DirectoryInfo.cs
- ServicePointManager.cs
- ExpandCollapsePattern.cs
- WindowsGraphics2.cs
- Constants.cs
- MimePart.cs
- Item.cs
- XmlEntity.cs
- AuthenticationService.cs
- WebConvert.cs
- DecimalAnimationBase.cs
- ProcessModelInfo.cs
- RecordConverter.cs
- SiteMapNodeItemEventArgs.cs
- QilStrConcatenator.cs
- ListViewGroupConverter.cs
- Pkcs9Attribute.cs
- CustomAttributeBuilder.cs