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
- CodeExpressionStatement.cs
- EntityDesignerDataSourceView.cs
- ResourceReferenceKeyNotFoundException.cs
- XmlIgnoreAttribute.cs
- CheckBoxField.cs
- RNGCryptoServiceProvider.cs
- CodeAttributeDeclarationCollection.cs
- InvalidEnumArgumentException.cs
- IntPtr.cs
- SerialErrors.cs
- ViewCellRelation.cs
- DocumentPageViewAutomationPeer.cs
- ExpressionContext.cs
- CharacterBuffer.cs
- ValidationError.cs
- DynamicFilterExpression.cs
- ObjectNotFoundException.cs
- DbgUtil.cs
- SessionStateModule.cs
- StorageEndPropertyMapping.cs
- ResourceManager.cs
- PropertyGridEditorPart.cs
- ValidatingPropertiesEventArgs.cs
- LinkedResourceCollection.cs
- WizardStepBase.cs
- dataobject.cs
- XamlPathDataSerializer.cs
- ColorContext.cs
- IncrementalReadDecoders.cs
- ValueExpressions.cs
- DoubleKeyFrameCollection.cs
- SettingsPropertyWrongTypeException.cs
- DynamicPropertyHolder.cs
- ToolStripItem.cs
- SocketManager.cs
- SignatureGenerator.cs
- PointHitTestParameters.cs
- TraceUtility.cs
- ConsoleCancelEventArgs.cs
- RoleManagerSection.cs
- IssuanceLicense.cs
- SqlDeflator.cs
- StrongNameIdentityPermission.cs
- OracleRowUpdatedEventArgs.cs
- WorkflowWebService.cs
- ServiceOperationParameter.cs
- HtmlTextArea.cs
- CodeGeneratorOptions.cs
- PKCS1MaskGenerationMethod.cs
- Decimal.cs
- ObjectDataSourceFilteringEventArgs.cs
- FormViewDeletedEventArgs.cs
- WindowsEditBox.cs
- PrimitiveDataContract.cs
- CorrelationKey.cs
- CdpEqualityComparer.cs
- PersonalizationStateQuery.cs
- RunInstallerAttribute.cs
- DiagnosticSection.cs
- WinCategoryAttribute.cs
- SqlCachedBuffer.cs
- SelectionProviderWrapper.cs
- InkSerializer.cs
- DynamicILGenerator.cs
- AddInDeploymentState.cs
- MenuAdapter.cs
- SiteMapDataSource.cs
- StrokeRenderer.cs
- OpenFileDialog.cs
- StyleModeStack.cs
- FontNameEditor.cs
- SafeViewOfFileHandle.cs
- FocusManager.cs
- EntityContainerRelationshipSet.cs
- ProfilePropertySettingsCollection.cs
- SubstitutionDesigner.cs
- __TransparentProxy.cs
- ToolStripDropDownClosingEventArgs.cs
- FieldToken.cs
- DecoderFallbackWithFailureFlag.cs
- SetStoryboardSpeedRatio.cs
- GridView.cs
- OrderByExpression.cs
- WebPartConnection.cs
- Span.cs
- WmpBitmapEncoder.cs
- SafeNativeMethods.cs
- WriteableBitmap.cs
- StatusBarItemAutomationPeer.cs
- ToolBarPanel.cs
- ReferentialConstraint.cs
- TextComposition.cs
- InvalidMessageContractException.cs
- EntitySqlQueryState.cs
- AnimationTimeline.cs
- UnknownWrapper.cs
- FilterableAttribute.cs
- DictionaryChange.cs
- MarkupCompilePass2.cs
- Select.cs