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
- ElapsedEventArgs.cs
- SQLChars.cs
- ComponentCodeDomSerializer.cs
- ProgressBarAutomationPeer.cs
- PolicyManager.cs
- BaseCollection.cs
- XPathEmptyIterator.cs
- COM2EnumConverter.cs
- SQLBoolean.cs
- ModelUtilities.cs
- TagMapInfo.cs
- ExtensionWindowResizeGrip.cs
- SspiHelper.cs
- SqlDataSourceQuery.cs
- ToolStripPanelRow.cs
- StringReader.cs
- DesigntimeLicenseContext.cs
- LassoSelectionBehavior.cs
- DriveNotFoundException.cs
- RecipientIdentity.cs
- XsdBuildProvider.cs
- DesignTimeType.cs
- SmiMetaData.cs
- Assembly.cs
- StateBag.cs
- SrgsDocumentParser.cs
- LineServicesRun.cs
- SrgsGrammar.cs
- AmbientEnvironment.cs
- SQLGuidStorage.cs
- RequestCachingSection.cs
- _SSPISessionCache.cs
- ExtensionElement.cs
- FontResourceCache.cs
- BuildProvider.cs
- DataGridRelationshipRow.cs
- FrameworkReadOnlyPropertyMetadata.cs
- PrimitiveXmlSerializers.cs
- OrderByQueryOptionExpression.cs
- BitmapFrame.cs
- HandlerFactoryWrapper.cs
- XPathExpr.cs
- CompoundFileStreamReference.cs
- SkinBuilder.cs
- ResourceExpressionBuilder.cs
- SqlAggregateChecker.cs
- ServiceMetadataPublishingElement.cs
- EmptyStringExpandableObjectConverter.cs
- COM2ComponentEditor.cs
- AggregateException.cs
- DataViewManager.cs
- ConnectionPoint.cs
- InvalidDataContractException.cs
- ApplicationHost.cs
- ControlParameter.cs
- VirtualizingStackPanel.cs
- DecoderExceptionFallback.cs
- WebBrowserEvent.cs
- Typography.cs
- OleAutBinder.cs
- NTAccount.cs
- documentation.cs
- AbstractDataSvcMapFileLoader.cs
- ObjectStateEntryDbDataRecord.cs
- TypeDescriptionProviderAttribute.cs
- DecimalAnimation.cs
- DataGridHeaderBorder.cs
- RC2CryptoServiceProvider.cs
- DataGridViewTextBoxColumn.cs
- ImportRequest.cs
- ServiceHostFactory.cs
- AppDomainFactory.cs
- GridViewDesigner.cs
- SafeNativeMethods.cs
- TextTreeNode.cs
- LicenseException.cs
- CodeSnippetTypeMember.cs
- InvokePattern.cs
- PerformanceCounterPermission.cs
- SmiMetaDataProperty.cs
- FixedPageProcessor.cs
- FormsIdentity.cs
- InternalMappingException.cs
- WebPartConnectionsCancelVerb.cs
- PropertyToken.cs
- TrackingSection.cs
- WindowsAltTab.cs
- DataErrorValidationRule.cs
- ListItem.cs
- XpsResource.cs
- XmlQualifiedNameTest.cs
- RoleService.cs
- DecoderBestFitFallback.cs
- AuthenticatingEventArgs.cs
- HandlerBase.cs
- DataGridViewCellPaintingEventArgs.cs
- ParserHooks.cs
- EmptyCollection.cs
- CachedTypeface.cs
- BitmapImage.cs