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
- ChangeBlockUndoRecord.cs
- ObfuscationAttribute.cs
- SqlFunctionAttribute.cs
- DataRowView.cs
- TextBreakpoint.cs
- MethodResolver.cs
- InternalConfigHost.cs
- Misc.cs
- SingleKeyFrameCollection.cs
- NameValuePair.cs
- SplitterPanelDesigner.cs
- DisplayNameAttribute.cs
- ParallelTimeline.cs
- VisualBasic.cs
- ToolBarPanel.cs
- xsdvalidator.cs
- SystemColors.cs
- WindowsGraphicsWrapper.cs
- XmlSchemaAppInfo.cs
- SynchronizedDispatch.cs
- SafeTimerHandle.cs
- ExecutionContext.cs
- FamilyTypeface.cs
- SpecialNameAttribute.cs
- QueryConverter.cs
- Rfc2898DeriveBytes.cs
- LogicalChannelCollection.cs
- WebBrowserNavigatingEventHandler.cs
- GorillaCodec.cs
- AppLevelCompilationSectionCache.cs
- MemberHolder.cs
- DataGridViewCellCancelEventArgs.cs
- ThemeDictionaryExtension.cs
- CodeBlockBuilder.cs
- SchemaMerger.cs
- Label.cs
- MultipartContentParser.cs
- StylusSystemGestureEventArgs.cs
- ConstructorBuilder.cs
- XmlUtilWriter.cs
- RepeaterItemCollection.cs
- EdmMember.cs
- RepeatButton.cs
- CustomAssemblyResolver.cs
- UnsafeNativeMethods.cs
- SplayTreeNode.cs
- ObjectKeyFrameCollection.cs
- TextSyndicationContentKindHelper.cs
- LifetimeServices.cs
- EntityTransaction.cs
- ImageSource.cs
- ServiceProviders.cs
- XmlDomTextWriter.cs
- RepeaterCommandEventArgs.cs
- safelinkcollection.cs
- TextAction.cs
- AtomMaterializerLog.cs
- WSDualHttpBindingCollectionElement.cs
- TypedReference.cs
- ExpressionPrefixAttribute.cs
- XmlHelper.cs
- DataBindingList.cs
- Timer.cs
- DataControlCommands.cs
- UpWmlPageAdapter.cs
- StylusOverProperty.cs
- remotingproxy.cs
- ClosableStream.cs
- ClientApiGenerator.cs
- DataGridViewSelectedRowCollection.cs
- ProcessInfo.cs
- SQLConvert.cs
- DBDataPermissionAttribute.cs
- HttpHeaderCollection.cs
- basevalidator.cs
- DialogResultConverter.cs
- PageThemeBuildProvider.cs
- ResolveInfo.cs
- LiteralControl.cs
- RequestTimeoutManager.cs
- KnownAssembliesSet.cs
- WebHttpDispatchOperationSelectorData.cs
- EmissiveMaterial.cs
- Executor.cs
- Processor.cs
- WindowsStartMenu.cs
- RightsManagementEncryptedStream.cs
- WindowsListViewGroup.cs
- AnnotationComponentManager.cs
- SqlUtil.cs
- ObjectListDataBindEventArgs.cs
- DataGridTableCollection.cs
- ConfigurationFileMap.cs
- BitConverter.cs
- ToolboxItemAttribute.cs
- ClientScriptManagerWrapper.cs
- SqlTypesSchemaImporter.cs
- SqlXmlStorage.cs
- ContentElementAutomationPeer.cs
- EnumerableRowCollection.cs