Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / ToolStripItemImageRenderEventArgs.cs / 1305376 / 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
- GridPatternIdentifiers.cs
- TrackingAnnotationCollection.cs
- ValueType.cs
- SqlConnectionHelper.cs
- MouseCaptureWithinProperty.cs
- ConfigurationException.cs
- WmlLiteralTextAdapter.cs
- TabRenderer.cs
- XmlExtensionFunction.cs
- MultipleViewPattern.cs
- UrlPath.cs
- _WinHttpWebProxyDataBuilder.cs
- CodeAssignStatement.cs
- GuidelineCollection.cs
- InternalControlCollection.cs
- ToolStripMenuItemCodeDomSerializer.cs
- ParseHttpDate.cs
- ColorConverter.cs
- SoapConverter.cs
- AnonymousIdentificationModule.cs
- SocketPermission.cs
- FontWeightConverter.cs
- UInt16.cs
- UnmanagedMemoryStreamWrapper.cs
- RuntimeConfigurationRecord.cs
- ToolboxItemAttribute.cs
- AssemblyBuilder.cs
- DataBoundControlHelper.cs
- RegistryPermission.cs
- Point3DCollection.cs
- SegmentTree.cs
- QuadraticBezierSegment.cs
- DesignTimeData.cs
- DataViewSettingCollection.cs
- SymmetricAlgorithm.cs
- Animatable.cs
- SafeCryptContextHandle.cs
- GeometryHitTestResult.cs
- NativeActivityFaultContext.cs
- PopupEventArgs.cs
- Win32SafeHandles.cs
- Tablet.cs
- InternalConfigConfigurationFactory.cs
- ExtenderProvidedPropertyAttribute.cs
- EtwTrackingParticipant.cs
- DataGridRow.cs
- TdsParserStaticMethods.cs
- Control.cs
- DoubleCollectionValueSerializer.cs
- GroupLabel.cs
- SecurityKeyIdentifier.cs
- DeclaredTypeElementCollection.cs
- SharedPersonalizationStateInfo.cs
- IPEndPointCollection.cs
- ReadWriteControlDesigner.cs
- ObjectDataSourceDisposingEventArgs.cs
- UnsafeNativeMethods.cs
- NumericUpDownAcceleration.cs
- XmlHelper.cs
- GenerateScriptTypeAttribute.cs
- SessionParameter.cs
- DefinitionUpdate.cs
- ObjectListCommandEventArgs.cs
- Avt.cs
- CallbackValidator.cs
- XmlAttributeProperties.cs
- AttributeEmitter.cs
- Html32TextWriter.cs
- WindowsTab.cs
- XmlDigitalSignatureProcessor.cs
- BlurBitmapEffect.cs
- PriorityRange.cs
- HttpRequestBase.cs
- ListViewItemSelectionChangedEvent.cs
- ColumnWidthChangingEvent.cs
- ReadWriteObjectLock.cs
- CodeDOMProvider.cs
- DetailsViewRow.cs
- RelativeSource.cs
- SmiRequestExecutor.cs
- Size3DConverter.cs
- SettingsSection.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- SqlParameter.cs
- BitmapSource.cs
- GroupBox.cs
- VBIdentifierDesigner.xaml.cs
- PolyLineSegment.cs
- SortFieldComparer.cs
- StrongNameIdentityPermission.cs
- NamedPermissionSet.cs
- basenumberconverter.cs
- PasswordBox.cs
- TcpSocketManager.cs
- WindowsTokenRoleProvider.cs
- PropertyStore.cs
- ContextMenu.cs
- HttpInputStream.cs
- ExcCanonicalXml.cs
- InputChannel.cs