Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / ToolStripItemImageRenderEventArgs.cs / 1305376 / 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
- ReflectionPermission.cs
- TCPListener.cs
- DoubleConverter.cs
- _CookieModule.cs
- SafeEventLogReadHandle.cs
- SiteOfOriginPart.cs
- ZipIOLocalFileDataDescriptor.cs
- WithParamAction.cs
- QilStrConcat.cs
- WebControlAdapter.cs
- EntityFunctions.cs
- HashRepartitionEnumerator.cs
- TextParagraphView.cs
- PropertyDescriptor.cs
- RTTrackingProfile.cs
- ContentPresenter.cs
- SafeLibraryHandle.cs
- ForeignKeyConstraint.cs
- MetadataPropertyvalue.cs
- ContextMarshalException.cs
- BamlBinaryWriter.cs
- TcpStreams.cs
- ObjectStateManager.cs
- SearchForVirtualItemEventArgs.cs
- COM2IDispatchConverter.cs
- ControlUtil.cs
- ZipIOLocalFileBlock.cs
- RenderData.cs
- LinqDataSourceSelectEventArgs.cs
- OleDbDataReader.cs
- EventPropertyMap.cs
- ResetableIterator.cs
- SequentialUshortCollection.cs
- FtpWebRequest.cs
- DriveNotFoundException.cs
- TableCell.cs
- TextSyndicationContent.cs
- CommandID.cs
- IPPacketInformation.cs
- DataListCommandEventArgs.cs
- DictionaryContent.cs
- SHA1Managed.cs
- MessagingActivityHelper.cs
- brushes.cs
- XPathScanner.cs
- SafePEFileHandle.cs
- HttpListenerPrefixCollection.cs
- RegexTree.cs
- MarkupExtensionReturnTypeAttribute.cs
- TabControlToolboxItem.cs
- ConfigurationManager.cs
- HttpGetServerProtocol.cs
- SchemaRegistration.cs
- StringReader.cs
- CounterSample.cs
- HttpCookie.cs
- SurrogateEncoder.cs
- FilterQueryOptionExpression.cs
- WebPartMinimizeVerb.cs
- Invariant.cs
- DataGridCheckBoxColumn.cs
- BaseValidator.cs
- RangeValidator.cs
- DispatcherEventArgs.cs
- SqlMethodTransformer.cs
- RootCodeDomSerializer.cs
- PositiveTimeSpanValidator.cs
- RemotingConfiguration.cs
- HMACSHA256.cs
- WindowVisualStateTracker.cs
- LocatorPart.cs
- AnimationTimeline.cs
- ParseChildrenAsPropertiesAttribute.cs
- IChannel.cs
- DescendentsWalker.cs
- RolePrincipal.cs
- DataGridHelper.cs
- Roles.cs
- TemplateControlParser.cs
- QilInvokeEarlyBound.cs
- Activity.cs
- AttachedPropertiesService.cs
- ConnectionStringsSection.cs
- Rotation3DAnimationUsingKeyFrames.cs
- HostedTransportConfigurationBase.cs
- WhileDesigner.cs
- ListBoxItemWrapperAutomationPeer.cs
- DictionarySectionHandler.cs
- UnsafeNativeMethods.cs
- HiddenField.cs
- AstTree.cs
- ButtonBase.cs
- ReflectTypeDescriptionProvider.cs
- formatstringdialog.cs
- CellTreeNodeVisitors.cs
- MetadataElement.cs
- HttpServerChannel.cs
- XmlSchemas.cs
- MetafileHeaderWmf.cs
- Main.cs