Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / MeasureItemEvent.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EncryptedKeyIdentifierClause.cs
- HttpListenerException.cs
- NativeCompoundFileAPIs.cs
- ToolStripDropDownClosingEventArgs.cs
- SettingsSection.cs
- MouseDevice.cs
- RuntimeHandles.cs
- ObjectHandle.cs
- TextRunTypographyProperties.cs
- JsonXmlDataContract.cs
- ChangeInterceptorAttribute.cs
- X509CertificateChain.cs
- SpinLock.cs
- RuntimeHandles.cs
- BinaryObjectReader.cs
- DBCommand.cs
- SerializableAttribute.cs
- InfoCardBaseException.cs
- TextTreeRootTextBlock.cs
- MenuAdapter.cs
- SqlInfoMessageEvent.cs
- ThrowHelper.cs
- RuntimeEnvironment.cs
- AppSecurityManager.cs
- Bezier.cs
- TcpTransportSecurityElement.cs
- WindowsSolidBrush.cs
- FileUpload.cs
- HtmlInputReset.cs
- FormViewModeEventArgs.cs
- ListViewAutomationPeer.cs
- BufferedGraphics.cs
- MatrixAnimationUsingPath.cs
- CultureMapper.cs
- DataSourceHelper.cs
- ToolStripDropDownButton.cs
- XmlSignatureProperties.cs
- StorageEndPropertyMapping.cs
- SqlBulkCopy.cs
- ReadWriteSpinLock.cs
- tabpagecollectioneditor.cs
- OdbcConnectionFactory.cs
- VScrollBar.cs
- Guid.cs
- TemplatePropertyEntry.cs
- PtsHelper.cs
- EventLevel.cs
- XmlNamedNodeMap.cs
- XmlJsonReader.cs
- TraceInternal.cs
- DeploymentExceptionMapper.cs
- HebrewNumber.cs
- ColorPalette.cs
- ScriptReferenceBase.cs
- EventQueueState.cs
- DirectoryNotFoundException.cs
- SerializerWriterEventHandlers.cs
- FontUnitConverter.cs
- FontFamilyValueSerializer.cs
- DocumentCollection.cs
- HttpModuleAction.cs
- TcpSocketManager.cs
- Activity.cs
- SchemaImporterExtension.cs
- CustomErrorsSection.cs
- XmlNotation.cs
- WebServiceFault.cs
- _AutoWebProxyScriptEngine.cs
- TransactionManager.cs
- ConfigurationElementProperty.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- ItemTypeToolStripMenuItem.cs
- FragmentQueryProcessor.cs
- StorageEndPropertyMapping.cs
- ServiceErrorHandler.cs
- FrameworkReadOnlyPropertyMetadata.cs
- VerticalAlignConverter.cs
- StaticExtension.cs
- DataGrid.cs
- Point3DAnimationUsingKeyFrames.cs
- TypeToken.cs
- Parsers.cs
- DataListItemCollection.cs
- _DigestClient.cs
- SQLInt64Storage.cs
- UnsafeCollabNativeMethods.cs
- RegisteredArrayDeclaration.cs
- PasswordDeriveBytes.cs
- X509Chain.cs
- CompositeActivityMarkupSerializer.cs
- AssociationTypeEmitter.cs
- DataGridViewCellStateChangedEventArgs.cs
- ContainerTracking.cs
- ProcessMonitor.cs
- X509Extension.cs
- DataGridViewLinkCell.cs
- ReadOnlyObservableCollection.cs
- FileVersion.cs
- PropertyTabAttribute.cs
- BasicViewGenerator.cs