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
- SelectedDatesCollection.cs
- PlainXmlSerializer.cs
- PartitionResolver.cs
- ParagraphVisual.cs
- MemoryMappedViewStream.cs
- Speller.cs
- SqlDependency.cs
- ConfigXmlText.cs
- ClipboardData.cs
- ResourceProviderFactory.cs
- EntityTypeBase.cs
- MainMenu.cs
- _DomainName.cs
- SafeEventLogReadHandle.cs
- DPTypeDescriptorContext.cs
- ListBase.cs
- MultiBindingExpression.cs
- ConstructorBuilder.cs
- ImageConverter.cs
- TraceUtils.cs
- LinqDataSourceUpdateEventArgs.cs
- BaseTemplateCodeDomTreeGenerator.cs
- GeneralTransform3DTo2DTo3D.cs
- LinqDataSourceDeleteEventArgs.cs
- StandardOleMarshalObject.cs
- Input.cs
- linebase.cs
- FormsAuthenticationUserCollection.cs
- ToolStripPanelSelectionGlyph.cs
- GridPatternIdentifiers.cs
- ToolStripDropDownItem.cs
- TextRunProperties.cs
- CssClassPropertyAttribute.cs
- HostProtectionException.cs
- AccessorTable.cs
- UnsafeNativeMethods.cs
- DataBinder.cs
- ManualResetEvent.cs
- SQlBooleanStorage.cs
- TransactionBehavior.cs
- SerializerWriterEventHandlers.cs
- Serializer.cs
- ServiceKnownTypeAttribute.cs
- ReferentialConstraint.cs
- EventMappingSettingsCollection.cs
- SingleObjectCollection.cs
- InstanceData.cs
- PowerEase.cs
- ListenerBinder.cs
- ResourceContainer.cs
- IntSecurity.cs
- ProfileParameter.cs
- PagesSection.cs
- BlockUIContainer.cs
- SortDescription.cs
- TypographyProperties.cs
- NestPullup.cs
- CryptoStream.cs
- RequestCacheManager.cs
- LocalizableAttribute.cs
- FixedElement.cs
- DataGridRelationshipRow.cs
- FontFamilyConverter.cs
- BitmapEffectCollection.cs
- ChannelCacheDefaults.cs
- ErrorItem.cs
- CachedPathData.cs
- DbConnectionHelper.cs
- PersonalizationProvider.cs
- PtsCache.cs
- AuthorizationRuleCollection.cs
- AutoSizeComboBox.cs
- XmlSchemaValidator.cs
- TextEditorLists.cs
- SignatureConfirmations.cs
- KeyConverter.cs
- DbSourceParameterCollection.cs
- IdnElement.cs
- SafeFileMappingHandle.cs
- RemoteArgument.cs
- Win32SafeHandles.cs
- ManagementObjectSearcher.cs
- DataGridBoolColumn.cs
- CqlWriter.cs
- Nullable.cs
- RSAOAEPKeyExchangeFormatter.cs
- TextRangeBase.cs
- CompiledXpathExpr.cs
- DataMemberFieldConverter.cs
- EmbossBitmapEffect.cs
- ToolStripPanelRow.cs
- ScrollChrome.cs
- TextServicesManager.cs
- ProtocolsSection.cs
- SessionIDManager.cs
- XamlStream.cs
- CodeThrowExceptionStatement.cs
- DataGridViewIntLinkedList.cs
- webclient.cs
- DataGridRow.cs