Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- InvalidateEvent.cs
- SecurityCriticalDataForSet.cs
- HttpDictionary.cs
- ChangeConflicts.cs
- Rect3D.cs
- Dynamic.cs
- SignatureConfirmations.cs
- ContextProperty.cs
- DrawingContextWalker.cs
- RouteCollection.cs
- WmpBitmapEncoder.cs
- StreamInfo.cs
- EventLogPermission.cs
- SystemTcpConnection.cs
- TaiwanCalendar.cs
- WhitespaceRuleLookup.cs
- ImageList.cs
- ValidatorAttribute.cs
- HandlerWithFactory.cs
- Bits.cs
- RenderDataDrawingContext.cs
- _BasicClient.cs
- CodeEntryPointMethod.cs
- GetLedgerEntryForRecipientRequest.cs
- ChannelManager.cs
- XPathQilFactory.cs
- PageRanges.cs
- ISAPIRuntime.cs
- DynamicRenderer.cs
- StateMachine.cs
- AddDataControlFieldDialog.cs
- NavigationPropertyEmitter.cs
- FactoryGenerator.cs
- ProxyWebPartConnectionCollection.cs
- TableCellCollection.cs
- RelativeSource.cs
- Converter.cs
- X509PeerCertificateElement.cs
- XmlQueryType.cs
- SQLBinary.cs
- KeyGesture.cs
- NameValuePermission.cs
- xmlglyphRunInfo.cs
- WebBrowsableAttribute.cs
- TextFormatterImp.cs
- HttpClientChannel.cs
- DataGridViewButtonCell.cs
- ScalarType.cs
- WebPartDeleteVerb.cs
- EpmSyndicationContentSerializer.cs
- ImageIndexConverter.cs
- ResourceReader.cs
- XmlSchemaComplexContentExtension.cs
- DynamicQueryableWrapper.cs
- CounterCreationDataConverter.cs
- CallTemplateAction.cs
- ResourcePool.cs
- Axis.cs
- Color.cs
- DbDataSourceEnumerator.cs
- MenuStrip.cs
- ProbeDuplexAsyncResult.cs
- SafeRightsManagementQueryHandle.cs
- ProfileService.cs
- Section.cs
- XPathNavigatorException.cs
- InvokeMemberBinder.cs
- EntityViewGenerationAttribute.cs
- UInt32Storage.cs
- Msmq3PoisonHandler.cs
- DesignTimeParseData.cs
- DesignerHost.cs
- XmlSchemaInfo.cs
- MatchingStyle.cs
- UInt16Converter.cs
- SqlSupersetValidator.cs
- WinInet.cs
- IssuedTokenClientElement.cs
- GeneralTransform3DGroup.cs
- EntityDataSourceEntityTypeFilterItem.cs
- ButtonDesigner.cs
- ZipIOModeEnforcingStream.cs
- ScrollChangedEventArgs.cs
- LockCookie.cs
- ToolstripProfessionalRenderer.cs
- ReplyChannelBinder.cs
- DesignRelationCollection.cs
- MobileComponentEditorPage.cs
- HostedTransportConfigurationManager.cs
- UiaCoreApi.cs
- EntityDataSourceQueryBuilder.cs
- AxWrapperGen.cs
- TextDecorationCollectionConverter.cs
- WinInetCache.cs
- NavigationHelper.cs
- XmlRootAttribute.cs
- FormsAuthenticationConfiguration.cs
- XmlObjectSerializerReadContextComplexJson.cs
- ConvertersCollection.cs
- SourceFileBuildProvider.cs