Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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.
//
//-----------------------------------------------------------------------------
/*
*/
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PointAnimationUsingKeyFrames.cs
- ApplicationTrust.cs
- ReadOnlyObservableCollection.cs
- Parsers.cs
- ReadOnlyDictionary.cs
- WsatTransactionInfo.cs
- SourceSwitch.cs
- SinglePhaseEnlistment.cs
- JavaScriptSerializer.cs
- WebHostUnsafeNativeMethods.cs
- ToggleProviderWrapper.cs
- SerTrace.cs
- TreeWalkHelper.cs
- DbModificationClause.cs
- DetailsViewDeleteEventArgs.cs
- TextServicesDisplayAttributePropertyRanges.cs
- DataRowView.cs
- RegexGroup.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- MultiPropertyDescriptorGridEntry.cs
- PrePrepareMethodAttribute.cs
- TimeSpanConverter.cs
- RectAnimationUsingKeyFrames.cs
- XamlFigureLengthSerializer.cs
- QilLiteral.cs
- XmlDataDocument.cs
- RequiredAttributeAttribute.cs
- _AuthenticationState.cs
- EditorZoneDesigner.cs
- DbMetaDataCollectionNames.cs
- OpCodes.cs
- ArgumentsParser.cs
- ContentElement.cs
- SchemaUtility.cs
- AssemblyBuilder.cs
- DataGridPagerStyle.cs
- TypeConstant.cs
- MenuBase.cs
- HtmlElementCollection.cs
- X509ServiceCertificateAuthentication.cs
- SortDescription.cs
- SystemTcpStatistics.cs
- MaskedTextProvider.cs
- ListGeneralPage.cs
- SchemaCollectionCompiler.cs
- PolyQuadraticBezierSegment.cs
- ClrProviderManifest.cs
- SupportingTokenListenerFactory.cs
- DataControlFieldHeaderCell.cs
- NameSpaceEvent.cs
- CompilerCollection.cs
- BamlLocalizableResource.cs
- DataGridAddNewRow.cs
- StatusStrip.cs
- FloaterParaClient.cs
- OdbcConnectionHandle.cs
- TdsParserSessionPool.cs
- SafeFileMappingHandle.cs
- WebPartHeaderCloseVerb.cs
- EnumerableValidator.cs
- FontResourceCache.cs
- Itemizer.cs
- NestedContainer.cs
- RowCache.cs
- Attributes.cs
- GridLength.cs
- WebProxyScriptElement.cs
- ExtendedPropertyCollection.cs
- FigureParaClient.cs
- EnumerableRowCollection.cs
- XpsPartBase.cs
- SolidColorBrush.cs
- panel.cs
- RubberbandSelector.cs
- shaperfactory.cs
- GlyphingCache.cs
- Aggregates.cs
- SerializationInfoEnumerator.cs
- Transform3D.cs
- PrinterUnitConvert.cs
- ValidateNames.cs
- ObjectKeyFrameCollection.cs
- CalloutQueueItem.cs
- VarRefManager.cs
- COAUTHIDENTITY.cs
- MsmqOutputSessionChannel.cs
- QueueException.cs
- DesignTimeXamlWriter.cs
- VariantWrapper.cs
- HttpCacheVary.cs
- LogArchiveSnapshot.cs
- EmissiveMaterial.cs
- SemanticBasicElement.cs
- ToolboxCategory.cs
- MdImport.cs
- HtmlHead.cs
- SocketInformation.cs
- DependencyPropertyKind.cs
- TraversalRequest.cs
- EditCommandColumn.cs