Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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.
//
//-----------------------------------------------------------------------------
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AlternationConverter.cs
- streamingZipPartStream.cs
- CodeAttachEventStatement.cs
- Missing.cs
- CodeThrowExceptionStatement.cs
- ClientTarget.cs
- CheckoutException.cs
- recordstatefactory.cs
- StructuredType.cs
- StringWriter.cs
- RelatedView.cs
- CompressedStack.cs
- EntityViewGenerator.cs
- RuleSet.cs
- IssuedTokenClientCredential.cs
- DockAndAnchorLayout.cs
- CodeSubDirectoriesCollection.cs
- LocalBuilder.cs
- DetailsViewRow.cs
- TrustManager.cs
- TreeView.cs
- XmlDocumentType.cs
- TextTreeRootNode.cs
- LineProperties.cs
- TraceListener.cs
- TreeIterator.cs
- EditingCoordinator.cs
- MailWebEventProvider.cs
- SourceElementsCollection.cs
- CustomWebEventKey.cs
- TaskExtensions.cs
- CompilerErrorCollection.cs
- ProvideValueServiceProvider.cs
- SoapMessage.cs
- DBAsyncResult.cs
- Throw.cs
- SingleAnimationBase.cs
- UriExt.cs
- ServiceParser.cs
- StorageAssociationSetMapping.cs
- PointUtil.cs
- ResourcePart.cs
- ContravarianceAdapter.cs
- InputScopeConverter.cs
- HttpListenerRequest.cs
- ServiceModelStringsVersion1.cs
- BasicCellRelation.cs
- SmiEventSink_Default.cs
- ValidateNames.cs
- XmlBindingWorker.cs
- FreezableCollection.cs
- OleDbRowUpdatedEvent.cs
- DoubleConverter.cs
- CommandHelpers.cs
- OracleConnection.cs
- CustomMenuItemCollection.cs
- VerticalConnector.xaml.cs
- DbDataAdapter.cs
- CacheChildrenQuery.cs
- processwaithandle.cs
- RightsManagementManager.cs
- TableCell.cs
- MetadataSerializer.cs
- PropertyItemInternal.cs
- Splitter.cs
- SR.cs
- ServerType.cs
- coordinatorfactory.cs
- Int32RectValueSerializer.cs
- HtmlTable.cs
- Keyboard.cs
- AmbientLight.cs
- ScriptReferenceEventArgs.cs
- FormatterServices.cs
- ComNativeDescriptor.cs
- StaticExtension.cs
- String.cs
- EndpointAddressMessageFilter.cs
- SQLMoneyStorage.cs
- Options.cs
- TextDecoration.cs
- OleDbSchemaGuid.cs
- TextBlock.cs
- ConfigErrorGlyph.cs
- TextTreeText.cs
- PropertyGroupDescription.cs
- DynamicFilterExpression.cs
- DataGridCellsPresenter.cs
- FontEmbeddingManager.cs
- _TimerThread.cs
- CalendarDay.cs
- ProxyWebPart.cs
- TypeTypeConverter.cs
- ColorBlend.cs
- _SecureChannel.cs
- DocumentGrid.cs
- JumpPath.cs
- ResXResourceReader.cs
- TemplatePartAttribute.cs
- InternalsVisibleToAttribute.cs