Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / ToolStripItemImageRenderEventArgs.cs / 1 / ToolStripItemImageRenderEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Windows.Forms {
using System.Drawing;
///
///
public class ToolStripItemImageRenderEventArgs : ToolStripItemRenderEventArgs {
private Image image = null;
private Rectangle imageRectangle = Rectangle.Empty;
private bool shiftOnPress = false;
public ToolStripItemImageRenderEventArgs(Graphics g, ToolStripItem item, Rectangle imageRectangle) : base(g, item) {
this.image = (item.RightToLeftAutoMirrorImage && (item.RightToLeft == RightToLeft.Yes)) ? item.MirroredImage : item.Image;
this.imageRectangle = imageRectangle;
}
///
///
/// This class represents all the information to render the winbar
///
public ToolStripItemImageRenderEventArgs(Graphics g, ToolStripItem item, Image image, Rectangle imageRectangle) : base(g, item) {
this.image = image;
this.imageRectangle = imageRectangle;
}
///
///
/// the string to draw
///
public Image Image {
get {
return image;
}
}
///
///
/// the rectangle to draw the Image in
///
public Rectangle ImageRectangle {
get {
return imageRectangle;
}
}
// not public as it currently pertains to button & system renderer.
internal bool ShiftOnPress {
get { return shiftOnPress; }
set { shiftOnPress = value; }
}
}
}
// 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
- ChtmlTextWriter.cs
- _SSPIWrapper.cs
- LayoutUtils.cs
- TheQuery.cs
- ContextBase.cs
- ScriptIgnoreAttribute.cs
- DataGridViewTextBoxEditingControl.cs
- UnsafeNativeMethods.cs
- RowType.cs
- Canvas.cs
- NetSectionGroup.cs
- Context.cs
- xmlglyphRunInfo.cs
- DiscoveryProxy.cs
- GeometryDrawing.cs
- MemberExpression.cs
- PointAnimationBase.cs
- PermissionSet.cs
- RemoteWebConfigurationHostStream.cs
- AutomationProperties.cs
- SessionStateUtil.cs
- AtomServiceDocumentSerializer.cs
- XamlRtfConverter.cs
- PixelShader.cs
- Utility.cs
- WindowsContainer.cs
- UIPermission.cs
- ReaderWriterLockSlim.cs
- SiteMapDataSource.cs
- Freezable.cs
- ContainerUtilities.cs
- TileBrush.cs
- FullTextLine.cs
- RuntimeConfig.cs
- Region.cs
- StylusPointPropertyUnit.cs
- SQLResource.cs
- WebPartVerbsEventArgs.cs
- ItemCollectionEditor.cs
- PersistenceContext.cs
- HotSpot.cs
- DataGridClipboardHelper.cs
- TextRangeEdit.cs
- NameSpaceExtractor.cs
- ComponentEditorPage.cs
- ReflectionPermission.cs
- ColumnReorderedEventArgs.cs
- SetterBase.cs
- TabControlEvent.cs
- PreDigestedSignedInfo.cs
- WindowsRegion.cs
- Odbc32.cs
- EntitySetDataBindingList.cs
- AccessDataSource.cs
- DataGridViewControlCollection.cs
- StreamReader.cs
- AutoScrollExpandMessageFilter.cs
- ScriptBehaviorDescriptor.cs
- PropertyGrid.cs
- ManualResetEvent.cs
- httpstaticobjectscollection.cs
- BitmapSizeOptions.cs
- X509SecurityTokenAuthenticator.cs
- ReflectionHelper.cs
- DataViewManager.cs
- AutomationPropertyInfo.cs
- NetworkAddressChange.cs
- ColumnMapProcessor.cs
- EntityDataSourceChangedEventArgs.cs
- SchemaElementLookUpTable.cs
- ListItemParagraph.cs
- MasterPage.cs
- StaticSiteMapProvider.cs
- NotSupportedException.cs
- IndependentAnimationStorage.cs
- StaticResourceExtension.cs
- StructuredTypeInfo.cs
- Trace.cs
- __Error.cs
- HttpSocketManager.cs
- DocumentDesigner.cs
- PartialList.cs
- InheritanceContextHelper.cs
- DataBoundControl.cs
- MimeMapping.cs
- Underline.cs
- WebZone.cs
- ScalarConstant.cs
- PrivacyNoticeBindingElementImporter.cs
- ListenerChannelContext.cs
- GridViewCellAutomationPeer.cs
- Thread.cs
- ArrayList.cs
- CompressStream.cs
- SecurityDocument.cs
- SessionPageStatePersister.cs
- ApplicationInfo.cs
- TransactionCache.cs
- PrivilegedConfigurationManager.cs
- DateTimeConverter.cs