Code:
/ FX-1434 / FX-1434 / 1.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
- ObjectQueryExecutionPlan.cs
- DesignerTransaction.cs
- WindowsSolidBrush.cs
- ExpressionValueEditor.cs
- StructuredProperty.cs
- DataServiceException.cs
- RowToParametersTransformer.cs
- CriticalHandle.cs
- SQlBooleanStorage.cs
- UntypedNullExpression.cs
- XomlCompilerResults.cs
- WeakEventManager.cs
- Utils.cs
- SByteStorage.cs
- OneWayBindingElementImporter.cs
- DefaultMergeHelper.cs
- XamlClipboardData.cs
- ExtendedTransformFactory.cs
- XmlDownloadManager.cs
- TextPattern.cs
- SwitchLevelAttribute.cs
- CryptoProvider.cs
- VersionValidator.cs
- NativeMethods.cs
- HtmlWindow.cs
- RotateTransform.cs
- MailDefinition.cs
- CqlQuery.cs
- SynchronizationContext.cs
- CodeChecksumPragma.cs
- Pair.cs
- itemelement.cs
- SoundPlayer.cs
- BitmapEffectOutputConnector.cs
- DiscoveryOperationContextExtension.cs
- RightsManagementInformation.cs
- HelpFileFileNameEditor.cs
- Registration.cs
- RemoteWebConfigurationHost.cs
- PropertyCondition.cs
- TabletDeviceInfo.cs
- XamlTreeBuilder.cs
- SelectionChangedEventArgs.cs
- CrossSiteScriptingValidation.cs
- DateTimeConverter2.cs
- _FixedSizeReader.cs
- DtcInterfaces.cs
- XslAst.cs
- XmlSchemaRedefine.cs
- WSUtilitySpecificationVersion.cs
- PolicyValidationException.cs
- XmlTextReaderImplHelpers.cs
- RedistVersionInfo.cs
- DelayedRegex.cs
- WebPartZoneBaseDesigner.cs
- TextBounds.cs
- XmlHierarchyData.cs
- BackoffTimeoutHelper.cs
- XmlSchemaAnyAttribute.cs
- AddingNewEventArgs.cs
- ImageSource.cs
- UnsafeCollabNativeMethods.cs
- SystemNetHelpers.cs
- DeploymentExceptionMapper.cs
- XDeferredAxisSource.cs
- FixedTextView.cs
- NavigationService.cs
- OLEDB_Enum.cs
- ProfileInfo.cs
- TextSchema.cs
- TextEffect.cs
- CollectionBuilder.cs
- PointHitTestResult.cs
- SizeAnimationClockResource.cs
- ButtonFieldBase.cs
- HttpClientCertificate.cs
- ToolStrip.cs
- MasterPage.cs
- EntityWrapperFactory.cs
- COM2TypeInfoProcessor.cs
- brushes.cs
- StringKeyFrameCollection.cs
- Span.cs
- ConnectionPointCookie.cs
- Pen.cs
- MatrixTransform3D.cs
- DataGridViewCell.cs
- RuleSetDialog.Designer.cs
- VariantWrapper.cs
- TextUtf8RawTextWriter.cs
- PersonalizationProviderCollection.cs
- Condition.cs
- ResXResourceWriter.cs
- WindowsListViewGroupSubsetLink.cs
- EndpointAddressAugust2004.cs
- SqlClientWrapperSmiStreamChars.cs
- XmlWrappingWriter.cs
- FloaterBaseParagraph.cs
- EntityContainerAssociationSetEnd.cs
- CLRBindingWorker.cs