Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / MeasureItemEvent.cs / 1 / MeasureItemEvent.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System.Diagnostics; using System; using System.ComponentModel; using System.Drawing; using Microsoft.Win32; ////// /// This event is sent by controls such as the ListBox or ComboBox that need users /// to tell them how large a given item is to be. /// public class MeasureItemEventArgs : EventArgs { private int itemHeight; private int itemWidth; private int index; private readonly System.Drawing.Graphics graphics; ////// /// public MeasureItemEventArgs(Graphics graphics, int index, int itemHeight) { this.graphics = graphics; this.index = index; this.itemHeight = itemHeight; this.itemWidth = 0; } ///[To be supplied.] ////// /// public MeasureItemEventArgs(Graphics graphics, int index) { this.graphics = graphics; this.index = index; this.itemHeight = 0; this.itemWidth = 0; } ///[To be supplied.] ////// /// A Graphics object to measure relative to. /// public System.Drawing.Graphics Graphics { get { return graphics; } } ////// /// The index of item for which the height/width is needed. /// public int Index { get { return index; } } ////// /// Where the recipient of the event should put the height of the /// item specified by the index. /// public int ItemHeight { get { return itemHeight; } set { itemHeight = value; } } ////// /// Where the recipient of the event should put the width of the /// item specified by the index. /// public int ItemWidth { get { return itemWidth; } set { itemWidth = 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.Diagnostics; using System; using System.ComponentModel; using System.Drawing; using Microsoft.Win32; ////// /// This event is sent by controls such as the ListBox or ComboBox that need users /// to tell them how large a given item is to be. /// public class MeasureItemEventArgs : EventArgs { private int itemHeight; private int itemWidth; private int index; private readonly System.Drawing.Graphics graphics; ////// /// public MeasureItemEventArgs(Graphics graphics, int index, int itemHeight) { this.graphics = graphics; this.index = index; this.itemHeight = itemHeight; this.itemWidth = 0; } ///[To be supplied.] ////// /// public MeasureItemEventArgs(Graphics graphics, int index) { this.graphics = graphics; this.index = index; this.itemHeight = 0; this.itemWidth = 0; } ///[To be supplied.] ////// /// A Graphics object to measure relative to. /// public System.Drawing.Graphics Graphics { get { return graphics; } } ////// /// The index of item for which the height/width is needed. /// public int Index { get { return index; } } ////// /// Where the recipient of the event should put the height of the /// item specified by the index. /// public int ItemHeight { get { return itemHeight; } set { itemHeight = value; } } ////// /// Where the recipient of the event should put the width of the /// item specified by the index. /// public int ItemWidth { get { return itemWidth; } set { itemWidth = 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
- ResourcesBuildProvider.cs
- FileVersionInfo.cs
- X509Utils.cs
- HttpWebRequest.cs
- CodeRegionDirective.cs
- Parser.cs
- _ConnectOverlappedAsyncResult.cs
- PagesChangedEventArgs.cs
- DbProviderSpecificTypePropertyAttribute.cs
- OleDbInfoMessageEvent.cs
- ScrollableControl.cs
- Assembly.cs
- PropertyEntry.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ColumnMapProcessor.cs
- SecurityPolicySection.cs
- MethodBody.cs
- BinaryVersion.cs
- BufferModesCollection.cs
- EventRoute.cs
- ColumnWidthChangingEvent.cs
- Section.cs
- XmlSchemaComplexType.cs
- OutOfProcStateClientManager.cs
- XslVisitor.cs
- DataRowExtensions.cs
- LiteralLink.cs
- AnnotationComponentManager.cs
- Calendar.cs
- Stacktrace.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- PreProcessInputEventArgs.cs
- ColorConvertedBitmap.cs
- RbTree.cs
- GacUtil.cs
- CalculatedColumn.cs
- FixedSOMElement.cs
- ParallelTimeline.cs
- NonPrimarySelectionGlyph.cs
- HttpDebugHandler.cs
- QuaternionAnimation.cs
- util.cs
- SafeArrayRankMismatchException.cs
- QilPatternVisitor.cs
- CommentGlyph.cs
- serverconfig.cs
- ParallelLoopState.cs
- FontStretchConverter.cs
- CompressedStack.cs
- CursorInteropHelper.cs
- DataGridCellsPresenter.cs
- ContractBase.cs
- PagerSettings.cs
- TakeOrSkipWhileQueryOperator.cs
- HelpProvider.cs
- GridViewCommandEventArgs.cs
- DataSourceHelper.cs
- SourceLineInfo.cs
- DetailsViewInsertedEventArgs.cs
- XmlLoader.cs
- SQLString.cs
- ToolStripContentPanel.cs
- WebPartDescriptionCollection.cs
- MouseEventArgs.cs
- SafeNativeMethodsOther.cs
- OleDbWrapper.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ToolStripPanelSelectionGlyph.cs
- TerminateSequence.cs
- SettingsAttributes.cs
- Thumb.cs
- ExceptionValidationRule.cs
- SelectionService.cs
- ProcessModelSection.cs
- HMAC.cs
- ParenthesizePropertyNameAttribute.cs
- XmlNodeWriter.cs
- ServerValidateEventArgs.cs
- QueryResponse.cs
- EntitySetBase.cs
- TargetInvocationException.cs
- IsolatedStorageFilePermission.cs
- SoapMessage.cs
- XmlSchemaAnyAttribute.cs
- ErrorFormatterPage.cs
- TypeReference.cs
- FrameworkPropertyMetadata.cs
- EdmItemCollection.cs
- StylusShape.cs
- BufferAllocator.cs
- SecurityUtils.cs
- QueryResponse.cs
- ListBase.cs
- FilterQueryOptionExpression.cs
- NonValidatingSecurityTokenAuthenticator.cs
- BufferBuilder.cs
- HwndStylusInputProvider.cs
- ReadOnlyDictionary.cs
- ToolStripRenderer.cs
- StringArrayConverter.cs