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
- FileDialogCustomPlacesCollection.cs
- UnsupportedPolicyOptionsException.cs
- HMACSHA384.cs
- Expressions.cs
- PageContent.cs
- DisplayInformation.cs
- DiscoveryMessageSequenceGenerator.cs
- WhitespaceRule.cs
- RemoteWebConfigurationHostStream.cs
- LogExtentCollection.cs
- ObjectStateFormatter.cs
- ShaderRenderModeValidation.cs
- WebPartDisplayModeCancelEventArgs.cs
- MemberCollection.cs
- ToolStripPanelRenderEventArgs.cs
- Logging.cs
- ContextProperty.cs
- CompilationUnit.cs
- TextEncodedRawTextWriter.cs
- LinkUtilities.cs
- EventTrigger.cs
- ProtocolsConfiguration.cs
- ComponentResourceKey.cs
- PrintingPermissionAttribute.cs
- FixedSOMGroup.cs
- StringAnimationBase.cs
- SudsParser.cs
- PinnedBufferMemoryStream.cs
- BinaryConverter.cs
- UInt32Converter.cs
- CssTextWriter.cs
- ObjectStateManagerMetadata.cs
- XmlArrayAttribute.cs
- ClientTargetCollection.cs
- GeneratedView.cs
- ToolStripDropTargetManager.cs
- GenericXmlSecurityTokenAuthenticator.cs
- CodeAttributeArgument.cs
- FrugalMap.cs
- HostingEnvironmentException.cs
- FloatUtil.cs
- RangeValidator.cs
- RawUIStateInputReport.cs
- SystemPens.cs
- HttpFormatExtensions.cs
- SafeRegistryHandle.cs
- NonClientArea.cs
- XPathDescendantIterator.cs
- CompoundFileStorageReference.cs
- PointCollection.cs
- OuterProxyWrapper.cs
- Control.cs
- WeakReadOnlyCollection.cs
- VSWCFServiceContractGenerator.cs
- TransactionInformation.cs
- ReaderOutput.cs
- DetailsViewInsertedEventArgs.cs
- BuildProvidersCompiler.cs
- MonitoringDescriptionAttribute.cs
- RawStylusActions.cs
- Int64AnimationUsingKeyFrames.cs
- ConsumerConnectionPointCollection.cs
- JsonEncodingStreamWrapper.cs
- TextTreeInsertUndoUnit.cs
- BinaryMessageEncodingElement.cs
- FileChangesMonitor.cs
- FixUp.cs
- Options.cs
- KeyInfo.cs
- JsonStringDataContract.cs
- BufferModeSettings.cs
- PropertyEntry.cs
- NameValuePair.cs
- DefaultClaimSet.cs
- XmlAttributeCollection.cs
- documentsequencetextview.cs
- ExtendLockCommand.cs
- ChannelServices.cs
- XmlCustomFormatter.cs
- FormViewUpdatedEventArgs.cs
- FunctionOverloadResolver.cs
- OdbcConnectionString.cs
- PrtCap_Public.cs
- ThreadTrace.cs
- KeyValuePair.cs
- BitmapEffectGeneralTransform.cs
- _SSPIWrapper.cs
- _NtlmClient.cs
- ISFTagAndGuidCache.cs
- SecureEnvironment.cs
- Geometry.cs
- ToolboxItemWrapper.cs
- XmlSchemaComplexContentExtension.cs
- Process.cs
- ConsumerConnectionPointCollection.cs
- TextEditorContextMenu.cs
- DesignerDataColumn.cs
- PrimitiveXmlSerializers.cs
- PerfService.cs
- ResXResourceSet.cs