Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlJsonReader.cs
- DefaultBindingPropertyAttribute.cs
- DesignerSerializerAttribute.cs
- webclient.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- UserControlDesigner.cs
- WeakReferenceEnumerator.cs
- SizeAnimationClockResource.cs
- UnsafeNativeMethods.cs
- SimpleMailWebEventProvider.cs
- DataControlFieldHeaderCell.cs
- TextEditor.cs
- NamespaceMapping.cs
- PropertyGridEditorPart.cs
- DefaultHttpHandler.cs
- TypeHelpers.cs
- QilTypeChecker.cs
- TabControl.cs
- HttpCookie.cs
- ISAPIWorkerRequest.cs
- FilePrompt.cs
- DataGridViewColumnEventArgs.cs
- PolicyStatement.cs
- PointIndependentAnimationStorage.cs
- RemotingSurrogateSelector.cs
- StreamGeometryContext.cs
- PathParser.cs
- MsmqProcessProtocolHandler.cs
- WebPartZoneCollection.cs
- CodePrimitiveExpression.cs
- WebPartConnectionsCancelVerb.cs
- CodeStatement.cs
- XmlResolver.cs
- TextDecorationLocationValidation.cs
- LogEntryHeaderv1Deserializer.cs
- SecurityManager.cs
- SocketManager.cs
- UnauthorizedAccessException.cs
- EditorServiceContext.cs
- TextServicesCompartment.cs
- LabelLiteral.cs
- WSTrust.cs
- Binding.cs
- RNGCryptoServiceProvider.cs
- XPathConvert.cs
- GridEntryCollection.cs
- oledbmetadatacollectionnames.cs
- _AcceptOverlappedAsyncResult.cs
- WSIdentityFaultException.cs
- ViewLoader.cs
- SQLBytes.cs
- AttributeData.cs
- CodeDOMUtility.cs
- JournalEntryListConverter.cs
- SourceItem.cs
- EventHandlerList.cs
- ResourceType.cs
- ManipulationPivot.cs
- MessagePropertyAttribute.cs
- PreloadedPackages.cs
- EmbeddedMailObjectsCollection.cs
- TemplatedWizardStep.cs
- smtppermission.cs
- TableLayout.cs
- PathData.cs
- InfiniteIntConverter.cs
- RelationshipDetailsRow.cs
- BStrWrapper.cs
- _TransmitFileOverlappedAsyncResult.cs
- GridViewUpdatedEventArgs.cs
- SynchronizedDisposablePool.cs
- ManagedIStream.cs
- SchemaMerger.cs
- HtmlTableRow.cs
- EncryptedKey.cs
- RectKeyFrameCollection.cs
- Regex.cs
- Cursors.cs
- _HeaderInfoTable.cs
- IODescriptionAttribute.cs
- KnownIds.cs
- DataSourceHelper.cs
- DiagnosticEventProvider.cs
- FlowDocumentFormatter.cs
- HttpResponse.cs
- PackagingUtilities.cs
- ApplicationSecurityInfo.cs
- TraceLog.cs
- embossbitmapeffect.cs
- DesignerDataParameter.cs
- Axis.cs
- ElementProxy.cs
- X509RawDataKeyIdentifierClause.cs
- AmbientValueAttribute.cs
- ImageMetadata.cs
- QuotedStringWriteStateInfo.cs
- XdrBuilder.cs
- ToolboxItemAttribute.cs
- RowCache.cs
- WSTrust.cs