Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- OpCopier.cs
- TextViewSelectionProcessor.cs
- WebPartCatalogAddVerb.cs
- MessageAction.cs
- DataViewSetting.cs
- StyleTypedPropertyAttribute.cs
- SoapReflectionImporter.cs
- ToggleButtonAutomationPeer.cs
- SafeProcessHandle.cs
- TypeName.cs
- COM2TypeInfoProcessor.cs
- XmlConvert.cs
- EndpointInfo.cs
- HostedNamedPipeTransportManager.cs
- ISAPIWorkerRequest.cs
- UnsafeNativeMethods.cs
- ColorBlend.cs
- EntityUtil.cs
- ToolStripRendererSwitcher.cs
- DbDataAdapter.cs
- TemplatedEditableDesignerRegion.cs
- DataListItem.cs
- XamlDesignerSerializationManager.cs
- MemberDescriptor.cs
- AsnEncodedData.cs
- TitleStyle.cs
- SpeechSynthesizer.cs
- KeyboardNavigation.cs
- Zone.cs
- AnimationClockResource.cs
- Message.cs
- WindowsScroll.cs
- InternalPermissions.cs
- mediapermission.cs
- ConnectionConsumerAttribute.cs
- ValueChangedEventManager.cs
- RequestQueryProcessor.cs
- Crypto.cs
- QueuePathEditor.cs
- AssemblyAssociatedContentFileAttribute.cs
- IntegerFacetDescriptionElement.cs
- VirtualPathExtension.cs
- XmlElementAttribute.cs
- ValidationEventArgs.cs
- PreviewPrintController.cs
- XmlUtil.cs
- ProcessHostServerConfig.cs
- URLString.cs
- tooltip.cs
- SQLByteStorage.cs
- NGCPageContentSerializerAsync.cs
- ComponentChangingEvent.cs
- PeerInvitationResponse.cs
- PathNode.cs
- TabRenderer.cs
- SubqueryRules.cs
- ProfilePropertyNameValidator.cs
- TrackingConditionCollection.cs
- SqlCacheDependency.cs
- BoundPropertyEntry.cs
- WorkflowRuntime.cs
- MenuItemAutomationPeer.cs
- XmlCDATASection.cs
- WSFederationHttpSecurityMode.cs
- DataContractJsonSerializerOperationBehavior.cs
- AmbientLight.cs
- BitmapPalettes.cs
- RemotingAttributes.cs
- MultiAsyncResult.cs
- SecurityCriticalDataForSet.cs
- PrimaryKeyTypeConverter.cs
- UserPreferenceChangedEventArgs.cs
- Handle.cs
- ToolBarButtonClickEvent.cs
- XmlSchemaObjectTable.cs
- MaskedTextProvider.cs
- TypographyProperties.cs
- HybridDictionary.cs
- WorkItem.cs
- DbDataAdapter.cs
- RegexInterpreter.cs
- IntegrationExceptionEventArgs.cs
- TransactionScope.cs
- FileFormatException.cs
- infer.cs
- RoleManagerModule.cs
- DataMember.cs
- PerfCounterSection.cs
- TextBounds.cs
- RemoteWebConfigurationHostServer.cs
- StaticResourceExtension.cs
- HtmlInputHidden.cs
- FactoryId.cs
- _NestedSingleAsyncResult.cs
- HttpModulesSection.cs
- SoapTypeAttribute.cs
- Durable.cs
- SqlStatistics.cs
- XmlEntityReference.cs
- DictionaryChange.cs