Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- RepeaterItem.cs
- XamlReaderHelper.cs
- ListSourceHelper.cs
- ValidationError.cs
- HMACSHA1.cs
- SafeTimerHandle.cs
- BufferModesCollection.cs
- SubpageParagraph.cs
- _WebProxyDataBuilder.cs
- PipelineModuleStepContainer.cs
- BasicHttpBindingCollectionElement.cs
- UnauthorizedAccessException.cs
- BitSet.cs
- SecurityTokenAuthenticator.cs
- cookiecontainer.cs
- TextEditorThreadLocalStore.cs
- PrintPreviewControl.cs
- Msec.cs
- CodeGeneratorAttribute.cs
- ResumeStoryboard.cs
- CustomErrorsSection.cs
- EntityContainer.cs
- NetworkInformationPermission.cs
- CssClassPropertyAttribute.cs
- OuterGlowBitmapEffect.cs
- InputQueue.cs
- CLRBindingWorker.cs
- SafeArrayTypeMismatchException.cs
- Schema.cs
- ListControlBuilder.cs
- ApplyHostConfigurationBehavior.cs
- SiteMapDataSource.cs
- TypeConvertions.cs
- ToolStripContentPanelDesigner.cs
- ManipulationPivot.cs
- WebServiceEnumData.cs
- PartitionResolver.cs
- DataBoundControl.cs
- PathTooLongException.cs
- MemberAccessException.cs
- CollectionBase.cs
- XmlIlGenerator.cs
- SmtpTransport.cs
- RNGCryptoServiceProvider.cs
- TogglePatternIdentifiers.cs
- ClockGroup.cs
- HttpHandlersSection.cs
- OleDbWrapper.cs
- Deflater.cs
- SqlReferenceCollection.cs
- Pts.cs
- ArithmeticLiteral.cs
- XmlParser.cs
- PerformanceCounterLib.cs
- CornerRadius.cs
- WebConfigurationManager.cs
- OleServicesContext.cs
- WebPartUtil.cs
- WsrmMessageInfo.cs
- WebSysDisplayNameAttribute.cs
- ColumnTypeConverter.cs
- XamlStream.cs
- PagesSection.cs
- DeleteStoreRequest.cs
- IPAddressCollection.cs
- XamlTypeMapper.cs
- TreeView.cs
- BindingExpressionUncommonField.cs
- Span.cs
- SqlCacheDependencySection.cs
- MachineKeySection.cs
- Evaluator.cs
- UnionCodeGroup.cs
- _DisconnectOverlappedAsyncResult.cs
- HyperLinkStyle.cs
- GeneralTransformGroup.cs
- SQLByteStorage.cs
- ComponentCommands.cs
- ServerIdentity.cs
- FigureHelper.cs
- AggregateNode.cs
- OleDbFactory.cs
- RelationshipConstraintValidator.cs
- ObsoleteAttribute.cs
- WebPartConnectionsEventArgs.cs
- AppearanceEditorPart.cs
- DbMetaDataFactory.cs
- ErrorRuntimeConfig.cs
- SpAudioStreamWrapper.cs
- ZipIOLocalFileBlock.cs
- RectValueSerializer.cs
- ToolStripItemRenderEventArgs.cs
- ApplyImportsAction.cs
- XamlHostingSectionGroup.cs
- BooleanAnimationUsingKeyFrames.cs
- PageBreakRecord.cs
- RoleManagerEventArgs.cs
- ToolboxItemSnapLineBehavior.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ColorEditor.cs