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
- MessageSmuggler.cs
- ContainerFilterService.cs
- DataControlFieldCell.cs
- TextTreeTextElementNode.cs
- HttpFileCollectionWrapper.cs
- WindowsImpersonationContext.cs
- MetadataItemEmitter.cs
- TypeConverter.cs
- SerialPort.cs
- AdjustableArrowCap.cs
- FlowDocumentView.cs
- NotificationContext.cs
- handlecollector.cs
- XmlAttributes.cs
- MarshalByRefObject.cs
- DebugView.cs
- FontSizeConverter.cs
- DropShadowBitmapEffect.cs
- StyleBamlRecordReader.cs
- ViewManager.cs
- TargetInvocationException.cs
- SelectionHighlightInfo.cs
- CapabilitiesSection.cs
- PersonalizationStateInfo.cs
- DetailsViewRow.cs
- RoleManagerModule.cs
- WebErrorHandler.cs
- GlyphRunDrawing.cs
- OleDbPropertySetGuid.cs
- MultipartContentParser.cs
- ExpressionBinding.cs
- CodeCastExpression.cs
- UriTemplateTable.cs
- KnownTypeAttribute.cs
- ColorAnimationUsingKeyFrames.cs
- XmlSchemaIdentityConstraint.cs
- XpsPartBase.cs
- DiagnosticsConfiguration.cs
- BuildProvidersCompiler.cs
- AssemblyBuilder.cs
- XamlDesignerSerializationManager.cs
- XamlStyleSerializer.cs
- DateTimeFormatInfoScanner.cs
- ConstructorNeedsTagAttribute.cs
- DataGridTableCollection.cs
- FrameworkElementAutomationPeer.cs
- StreamWriter.cs
- SQLStringStorage.cs
- ConnectionPointCookie.cs
- FixedSOMLineRanges.cs
- AsymmetricSignatureFormatter.cs
- RemoteX509Token.cs
- PersonalizableAttribute.cs
- PageAsyncTask.cs
- SHA512CryptoServiceProvider.cs
- QueryCursorEventArgs.cs
- DbMetaDataCollectionNames.cs
- ClockGroup.cs
- ClientBuildManager.cs
- SimpleType.cs
- FrameSecurityDescriptor.cs
- XXXInfos.cs
- CompleteWizardStep.cs
- SchemaObjectWriter.cs
- brushes.cs
- ConnectionsZoneDesigner.cs
- SessionPageStateSection.cs
- PageRanges.cs
- SolidColorBrush.cs
- HtmlTextArea.cs
- RedistVersionInfo.cs
- TableLayoutRowStyleCollection.cs
- SkinBuilder.cs
- Terminate.cs
- SqlBuilder.cs
- State.cs
- ToolStripItemEventArgs.cs
- AccessDataSource.cs
- SspiSecurityTokenProvider.cs
- ParameterDataSourceExpression.cs
- ComplexBindingPropertiesAttribute.cs
- ContextMenuStripGroupCollection.cs
- DoubleAnimationBase.cs
- OdbcException.cs
- XmlLanguageConverter.cs
- BufferAllocator.cs
- SerializerWriterEventHandlers.cs
- GlobalEventManager.cs
- SetStoryboardSpeedRatio.cs
- Parameter.cs
- EasingFunctionBase.cs
- PerformanceCounterCategory.cs
- SmtpMail.cs
- PropertyAccessVisitor.cs
- ReplacementText.cs
- BoolExpression.cs
- ArgumentOutOfRangeException.cs
- SimpleMailWebEventProvider.cs
- TraceContextRecord.cs
- SolidColorBrush.cs