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
- DependencyPropertyValueSerializer.cs
- NameValuePermission.cs
- Pipe.cs
- MemberAccessException.cs
- PropertyItem.cs
- FullTrustAssemblyCollection.cs
- Visual3DCollection.cs
- UndoManager.cs
- ACL.cs
- WbemProvider.cs
- ErrorHandler.cs
- ReadOnlyDictionary.cs
- WindowsUpDown.cs
- TransformedBitmap.cs
- InvalidateEvent.cs
- HTTPNotFoundHandler.cs
- StreamGeometryContext.cs
- TransformationRules.cs
- Zone.cs
- DBDataPermissionAttribute.cs
- WebPartManagerInternals.cs
- BitmapEffectInput.cs
- DataSourceListEditor.cs
- tooltip.cs
- ViewBase.cs
- IsolatedStorageFileStream.cs
- HttpCachePolicyElement.cs
- RegionInfo.cs
- DataTable.cs
- MimeWriter.cs
- DataObjectPastingEventArgs.cs
- UrlAuthFailedErrorFormatter.cs
- VBCodeProvider.cs
- RuleSettings.cs
- ButtonChrome.cs
- PersonalizableTypeEntry.cs
- XpsSerializationManagerAsync.cs
- SmiXetterAccessMap.cs
- PropagatorResult.cs
- MouseEventArgs.cs
- HttpPostLocalhostServerProtocol.cs
- InputLangChangeRequestEvent.cs
- StyleBamlTreeBuilder.cs
- TableLayoutStyle.cs
- HtmlToClrEventProxy.cs
- ToolStripComboBox.cs
- IDQuery.cs
- Panel.cs
- basevalidator.cs
- ProfilePropertySettings.cs
- ListView.cs
- TraceSection.cs
- SwitchAttribute.cs
- ClientOptions.cs
- ControlValuePropertyAttribute.cs
- TextPenaltyModule.cs
- FileSystemWatcher.cs
- CodeLabeledStatement.cs
- ListView.cs
- XsdDuration.cs
- GroupBox.cs
- GridViewPageEventArgs.cs
- Misc.cs
- ContextStack.cs
- NativeMethods.cs
- TableRow.cs
- PersonalizationStateInfo.cs
- ParameterEditorUserControl.cs
- NumericUpDownAcceleration.cs
- PropertyDescriptorGridEntry.cs
- ExpressionBinding.cs
- ResourcePermissionBaseEntry.cs
- ModuleBuilder.cs
- DbConnectionPoolOptions.cs
- HtmlValidationSummaryAdapter.cs
- ChannelServices.cs
- TextEditorLists.cs
- ProtocolsSection.cs
- OrderedEnumerableRowCollection.cs
- UInt16.cs
- InternalEnumValidator.cs
- CornerRadiusConverter.cs
- D3DImage.cs
- EventlogProvider.cs
- AdapterUtil.cs
- control.ime.cs
- XamlReaderConstants.cs
- InkCanvasFeedbackAdorner.cs
- RadioButton.cs
- PathTooLongException.cs
- CategoryAttribute.cs
- PerformanceCounterPermissionAttribute.cs
- Hashtable.cs
- MinimizableAttributeTypeConverter.cs
- TableItemPatternIdentifiers.cs
- BuildProvidersCompiler.cs
- MailAddressParser.cs
- XmlCharacterData.cs
- FixedPageStructure.cs
- httpstaticobjectscollection.cs