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
- UndirectedGraph.cs
- PrePrepareMethodAttribute.cs
- Wow64ConfigurationLoader.cs
- TraceContextEventArgs.cs
- MergeFailedEvent.cs
- NotFiniteNumberException.cs
- HashSet.cs
- Vector3DAnimation.cs
- CollectionTraceRecord.cs
- Lease.cs
- KerberosRequestorSecurityToken.cs
- PersonalizablePropertyEntry.cs
- ContentPlaceHolderDesigner.cs
- FlowPosition.cs
- TraceHandler.cs
- Vector3DValueSerializer.cs
- PropertyKey.cs
- _TransmitFileOverlappedAsyncResult.cs
- XPathNodeInfoAtom.cs
- SharedDp.cs
- WsdlHelpGeneratorElement.cs
- PropertyConverter.cs
- CategoryAttribute.cs
- CompiledQueryCacheKey.cs
- indexingfiltermarshaler.cs
- BrowserDefinitionCollection.cs
- XmlText.cs
- GridViewAutomationPeer.cs
- HttpSessionStateBase.cs
- MethodBody.cs
- HttpDictionary.cs
- EpmHelper.cs
- ListViewAutomationPeer.cs
- ViewgenContext.cs
- SafeEventLogReadHandle.cs
- HtmlShimManager.cs
- TdsEnums.cs
- PersonalizationDictionary.cs
- TreeNode.cs
- arc.cs
- _ChunkParse.cs
- StylusPointPropertyUnit.cs
- ListBoxAutomationPeer.cs
- ClientData.cs
- DbLambda.cs
- InstanceKey.cs
- AnnotationComponentManager.cs
- SqlCacheDependencySection.cs
- Grid.cs
- InteropAutomationProvider.cs
- DefaultParameterValueAttribute.cs
- ConfigurationSection.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- XmlNamespaceMapping.cs
- KerberosRequestorSecurityToken.cs
- BindingEntityInfo.cs
- Helpers.cs
- MediaCommands.cs
- ListViewDataItem.cs
- BevelBitmapEffect.cs
- TreeView.cs
- SafeHandles.cs
- Token.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- HuffmanTree.cs
- SByteConverter.cs
- SvcMapFile.cs
- _SslState.cs
- ListViewContainer.cs
- TabControl.cs
- SecureEnvironment.cs
- CompositionAdorner.cs
- UICuesEvent.cs
- UpDownBase.cs
- SafeProcessHandle.cs
- ClientRoleProvider.cs
- ToolStripLocationCancelEventArgs.cs
- SqlTrackingService.cs
- EntityContainer.cs
- CodeTypeConstructor.cs
- unsafenativemethodsother.cs
- counter.cs
- FrameworkElementFactoryMarkupObject.cs
- ListViewGroup.cs
- PrimarySelectionAdorner.cs
- XmlSchemaElement.cs
- HttpCacheVaryByContentEncodings.cs
- AttributeUsageAttribute.cs
- SoapClientMessage.cs
- CompilerTypeWithParams.cs
- ObjectParameterCollection.cs
- Stack.cs
- TimeZone.cs
- Method.cs
- ComProxy.cs
- PopOutPanel.cs
- Rectangle.cs
- ALinqExpressionVisitor.cs
- SiteMapProvider.cs