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
- RequestStatusBarUpdateEventArgs.cs
- ScriptControlManager.cs
- FixedDocumentSequencePaginator.cs
- SmtpNegotiateAuthenticationModule.cs
- TreeIterator.cs
- Camera.cs
- InputGestureCollection.cs
- TypeBrowser.xaml.cs
- GeometryValueSerializer.cs
- InnerItemCollectionView.cs
- compensatingcollection.cs
- SubqueryTrackingVisitor.cs
- Int32AnimationBase.cs
- ActivityXRefPropertyEditor.cs
- RemoteX509Token.cs
- ISFTagAndGuidCache.cs
- WizardForm.cs
- ResourceContainer.cs
- FunctionUpdateCommand.cs
- ExtractorMetadata.cs
- FixedPageStructure.cs
- PageSettings.cs
- Single.cs
- UnknownWrapper.cs
- ProfileSettingsCollection.cs
- DetailsViewModeEventArgs.cs
- SrgsGrammarCompiler.cs
- SvcMapFileLoader.cs
- StyleSelector.cs
- UInt32Converter.cs
- WorkflowShape.cs
- OleDbParameter.cs
- BeginEvent.cs
- Pen.cs
- TagElement.cs
- GridLengthConverter.cs
- _ServiceNameStore.cs
- AdapterSwitches.cs
- BidirectionalDictionary.cs
- InvocationExpression.cs
- TabletDeviceInfo.cs
- MarkerProperties.cs
- InstanceNormalEvent.cs
- Mappings.cs
- MouseGesture.cs
- CornerRadiusConverter.cs
- TextLineBreak.cs
- SrgsDocumentParser.cs
- SupportsEventValidationAttribute.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- BitArray.cs
- HtmlInputControl.cs
- SubpageParagraph.cs
- EntityCollection.cs
- Win32PrintDialog.cs
- RequestCachePolicy.cs
- DataObjectMethodAttribute.cs
- PolyQuadraticBezierSegment.cs
- diagnosticsswitches.cs
- Pair.cs
- TypeResolvingOptionsAttribute.cs
- CancelRequestedQuery.cs
- XmlImplementation.cs
- GcSettings.cs
- RegionData.cs
- WindowsSecurityToken.cs
- ExtendedProtectionPolicyElement.cs
- RoleGroup.cs
- SmtpDigestAuthenticationModule.cs
- RequestDescription.cs
- MaterialGroup.cs
- CollectionType.cs
- ClrPerspective.cs
- ConfigXmlCDataSection.cs
- ParserStreamGeometryContext.cs
- ParamArrayAttribute.cs
- RectangleGeometry.cs
- _HelperAsyncResults.cs
- HttpWebRequestElement.cs
- CompositeCollection.cs
- ValidatorCompatibilityHelper.cs
- PropertyManager.cs
- IApplicationTrustManager.cs
- Pkcs9Attribute.cs
- WsdlServiceChannelBuilder.cs
- GenericParameterDataContract.cs
- InputLanguageSource.cs
- BitmapEffect.cs
- Axis.cs
- DataGridLinkButton.cs
- TableParaClient.cs
- XslCompiledTransform.cs
- TextSelection.cs
- SymLanguageType.cs
- LogExtent.cs
- MetaTable.cs
- AdornedElementPlaceholder.cs
- ObjectQuery_EntitySqlExtensions.cs
- FilterQueryOptionExpression.cs
- TextProviderWrapper.cs