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
- TextEffectCollection.cs
- FileLevelControlBuilderAttribute.cs
- Html32TextWriter.cs
- TrackingAnnotationCollection.cs
- ControlPropertyNameConverter.cs
- BuildResultCache.cs
- AnimationStorage.cs
- AdornerLayer.cs
- ViewgenContext.cs
- CodeGenerator.cs
- TemplateBindingExtension.cs
- RightsManagementPermission.cs
- RenderDataDrawingContext.cs
- SecurityChannelFactory.cs
- MetadataArtifactLoaderFile.cs
- DbUpdateCommandTree.cs
- DbDataAdapter.cs
- WindowsUpDown.cs
- CorrelationService.cs
- LocalizationParserHooks.cs
- FlowLayoutSettings.cs
- CallbackValidator.cs
- LinkedResource.cs
- ToolStripContainer.cs
- ConstructorBuilder.cs
- GridView.cs
- ContentIterators.cs
- FixedStringLookup.cs
- BindingList.cs
- ISCIIEncoding.cs
- PersonalizationProviderHelper.cs
- HttpProfileGroupBase.cs
- DefaultExpressionVisitor.cs
- SharedPerformanceCounter.cs
- QueryConverter.cs
- SerializationInfo.cs
- XmlAttributes.cs
- Serializer.cs
- InternalConfigConfigurationFactory.cs
- ImageButton.cs
- GridViewSortEventArgs.cs
- PolicyManager.cs
- PagedDataSource.cs
- SqlAggregateChecker.cs
- Button.cs
- PassportPrincipal.cs
- CollectionViewSource.cs
- UnhandledExceptionEventArgs.cs
- CompilationPass2TaskInternal.cs
- SerializationEventsCache.cs
- RequestQueryParser.cs
- Matrix3DValueSerializer.cs
- AuthenticationServiceManager.cs
- ObservableDictionary.cs
- HelpKeywordAttribute.cs
- CodeCompileUnit.cs
- ImageAnimator.cs
- InternalCache.cs
- XmlStreamStore.cs
- SettingsPropertyCollection.cs
- DbSetClause.cs
- JsonSerializer.cs
- SettingsAttributes.cs
- EnvelopedPkcs7.cs
- SiteMapDataSourceDesigner.cs
- ElementProxy.cs
- DesigntimeLicenseContext.cs
- Thread.cs
- Point3DValueSerializer.cs
- EntityModelSchemaGenerator.cs
- DataGridHelper.cs
- PropertyNames.cs
- DescendantBaseQuery.cs
- InputBuffer.cs
- ComponentResourceKey.cs
- ServiceX509SecurityTokenProvider.cs
- MenuItemStyle.cs
- LineUtil.cs
- smtppermission.cs
- UnsafeNativeMethods.cs
- EntityDataSourceState.cs
- TypeSystem.cs
- TextElementEnumerator.cs
- ReservationCollection.cs
- _ChunkParse.cs
- SoapReflectionImporter.cs
- Propagator.Evaluator.cs
- QilName.cs
- ListDictionary.cs
- SwitchElementsCollection.cs
- NTAccount.cs
- WebPartMenu.cs
- MenuItemBindingCollection.cs
- GlyphElement.cs
- WebPartConnectionsConfigureVerb.cs
- SqlStatistics.cs
- HMAC.cs
- Events.cs
- JsonDataContract.cs
- VirtualizingPanel.cs