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
- ElementInit.cs
- SimpleWorkerRequest.cs
- GregorianCalendar.cs
- XPathException.cs
- MemberAccessException.cs
- FileStream.cs
- PagerSettings.cs
- OleAutBinder.cs
- ProfileManager.cs
- ArcSegment.cs
- FileRegion.cs
- SwitchLevelAttribute.cs
- ArraySegment.cs
- SqlClientWrapperSmiStreamChars.cs
- PathGeometry.cs
- DataGridViewCellStyleConverter.cs
- InstanceContextManager.cs
- XmlSchemaIdentityConstraint.cs
- EncoderFallback.cs
- ActiveXContainer.cs
- NativeStructs.cs
- WebPartConnectionCollection.cs
- EmptyEnumerator.cs
- CallInfo.cs
- BufferedStream.cs
- AsyncPostBackErrorEventArgs.cs
- BackgroundWorker.cs
- SecurityContextSecurityTokenAuthenticator.cs
- SqlStream.cs
- TrimSurroundingWhitespaceAttribute.cs
- LongCountAggregationOperator.cs
- RequestCacheManager.cs
- JournalEntryListConverter.cs
- TemplateLookupAction.cs
- JoinSymbol.cs
- DependencyPropertyHelper.cs
- DiagnosticTrace.cs
- DataRow.cs
- tibetanshape.cs
- NativeMethods.cs
- HttpStreamFormatter.cs
- RolePrincipal.cs
- AsymmetricSignatureFormatter.cs
- Translator.cs
- TypeKeyValue.cs
- ViewKeyConstraint.cs
- MultiAsyncResult.cs
- StringDictionaryEditor.cs
- Pointer.cs
- SmiRequestExecutor.cs
- StateRuntime.cs
- RegexParser.cs
- DependencyPropertyKind.cs
- SafeFileHandle.cs
- AsyncDataRequest.cs
- Grid.cs
- WebBrowserDocumentCompletedEventHandler.cs
- BindingsCollection.cs
- AstNode.cs
- ConstructorNeedsTagAttribute.cs
- FixedFlowMap.cs
- _ConnectStream.cs
- OletxResourceManager.cs
- Maps.cs
- updatecommandorderer.cs
- _ContextAwareResult.cs
- FormatterConverter.cs
- ResetableIterator.cs
- DrawListViewItemEventArgs.cs
- BrowserDefinition.cs
- ExtendedTransformFactory.cs
- Pkcs7Signer.cs
- HasCopySemanticsAttribute.cs
- DataTableExtensions.cs
- StylusOverProperty.cs
- HostingEnvironmentWrapper.cs
- BaseCodePageEncoding.cs
- DiscoveryClientBindingElement.cs
- SecurityKeyUsage.cs
- QueryGeneratorBase.cs
- SynchronizedKeyedCollection.cs
- ObjectItemCachedAssemblyLoader.cs
- OnOperation.cs
- ScrollChrome.cs
- DesignTimeSiteMapProvider.cs
- RegexEditorDialog.cs
- DependencyObjectPropertyDescriptor.cs
- DescendantBaseQuery.cs
- HostedController.cs
- Vector3DCollectionValueSerializer.cs
- PrintingPermissionAttribute.cs
- FormatterServices.cs
- HostingEnvironmentSection.cs
- SecurityPermission.cs
- XPathDocument.cs
- NativeActivityMetadata.cs
- X509ServiceCertificateAuthentication.cs
- SQLChars.cs
- ListBoxAutomationPeer.cs
- SpeechRecognizer.cs