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
- ZoneLinkButton.cs
- ReadOnlyHierarchicalDataSource.cs
- FtpWebRequest.cs
- GeneralTransform.cs
- SqlCacheDependencyDatabaseCollection.cs
- ToolStripContainer.cs
- EncryptedKeyIdentifierClause.cs
- DomNameTable.cs
- TickBar.cs
- AssemblyBuilder.cs
- DbMetaDataColumnNames.cs
- DataGridRowsPresenter.cs
- OleDbPermission.cs
- CustomLineCap.cs
- WorkflowServiceNamespace.cs
- ByeMessage11.cs
- DataReaderContainer.cs
- SupportsEventValidationAttribute.cs
- DataGridViewLinkColumn.cs
- DataFormats.cs
- XsdBuilder.cs
- TimeZone.cs
- SqlCaseSimplifier.cs
- SqlReferenceCollection.cs
- FormViewModeEventArgs.cs
- followingquery.cs
- AutoResetEvent.cs
- StringComparer.cs
- PopupEventArgs.cs
- ContentElementAutomationPeer.cs
- ImportCatalogPart.cs
- UnaryNode.cs
- XmlSerializer.cs
- WebReferencesBuildProvider.cs
- PointAnimation.cs
- ChildrenQuery.cs
- QuaternionRotation3D.cs
- SqlPersonalizationProvider.cs
- TraceXPathNavigator.cs
- HwndAppCommandInputProvider.cs
- PerformanceCounter.cs
- CustomAttribute.cs
- DynamicQueryableWrapper.cs
- ToolStripLabel.cs
- BlurEffect.cs
- GroupBoxRenderer.cs
- Pair.cs
- DefaultBindingPropertyAttribute.cs
- MinimizableAttributeTypeConverter.cs
- WindowClosedEventArgs.cs
- BamlTreeUpdater.cs
- ELinqQueryState.cs
- MenuItemCollection.cs
- XmlDataProvider.cs
- CloudCollection.cs
- MutexSecurity.cs
- XsltLibrary.cs
- ContextStaticAttribute.cs
- DragAssistanceManager.cs
- ReachBasicContext.cs
- InstanceKeyNotReadyException.cs
- PrintControllerWithStatusDialog.cs
- AnnotationService.cs
- DataContractSerializerOperationFormatter.cs
- PersianCalendar.cs
- QualificationDataAttribute.cs
- OrCondition.cs
- Shared.cs
- AppSettingsReader.cs
- FixedBufferAttribute.cs
- VolatileEnlistmentState.cs
- RangeValidator.cs
- LeaseManager.cs
- SerialErrors.cs
- GacUtil.cs
- TrailingSpaceComparer.cs
- StretchValidation.cs
- DetailsViewPagerRow.cs
- AstTree.cs
- RequestTimeoutManager.cs
- AdRotator.cs
- FormViewModeEventArgs.cs
- ThreadExceptionEvent.cs
- ExpressionBuilderContext.cs
- XhtmlTextWriter.cs
- HMACSHA256.cs
- XmlHierarchyData.cs
- Blend.cs
- VariableQuery.cs
- SQLBinary.cs
- NonParentingControl.cs
- HotSpotCollection.cs
- AppDomain.cs
- BitStack.cs
- TextEditorTables.cs
- ProjectionCamera.cs
- XamlGridLengthSerializer.cs
- JournalNavigationScope.cs
- MenuEventArgs.cs
- HtmlValidationSummaryAdapter.cs