Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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. // //----------------------------------------------------------------------------- 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
- WpfXamlMember.cs
- SafeNativeMethodsCLR.cs
- ErrorFormatterPage.cs
- GenericRootAutomationPeer.cs
- ClientRuntimeConfig.cs
- SubMenuStyleCollection.cs
- MissingFieldException.cs
- TableHeaderCell.cs
- DiscoveryClientDocuments.cs
- AsyncSerializedWorker.cs
- ApplicationContext.cs
- FaultContractInfo.cs
- DeploymentSectionCache.cs
- PropertyCollection.cs
- TrackingConditionCollection.cs
- TransformerConfigurationWizardBase.cs
- SqlXml.cs
- PasswordRecovery.cs
- TCPClient.cs
- LazyTextWriterCreator.cs
- VirtualPath.cs
- TextElementCollection.cs
- ComplexBindingPropertiesAttribute.cs
- IChannel.cs
- DeploymentExceptionMapper.cs
- ItemsPresenter.cs
- SrgsText.cs
- SqlInfoMessageEvent.cs
- NodeFunctions.cs
- TimerElapsedEvenArgs.cs
- ConversionValidationRule.cs
- ListView.cs
- CompositeControlDesigner.cs
- PageAsyncTask.cs
- CompilerCollection.cs
- XmlStringTable.cs
- VisualStateChangedEventArgs.cs
- mediaeventargs.cs
- PageAsyncTaskManager.cs
- Listbox.cs
- GetKeyedHashRequest.cs
- TypeInfo.cs
- CommandConverter.cs
- SatelliteContractVersionAttribute.cs
- ArrayList.cs
- CardSpaceException.cs
- DependencyPropertyKey.cs
- WorkflowPersistenceService.cs
- ArraySortHelper.cs
- GridViewColumnCollection.cs
- OracleException.cs
- _LazyAsyncResult.cs
- PageRequestManager.cs
- ItemCollection.cs
- SqlUDTStorage.cs
- TimeSpanConverter.cs
- WebPartConnectionsCloseVerb.cs
- KeyProperty.cs
- SafeLocalAllocation.cs
- CalendarKeyboardHelper.cs
- TransactionManager.cs
- GeneralTransform3D.cs
- KoreanLunisolarCalendar.cs
- DropDownButton.cs
- ConfigurationLocationCollection.cs
- DateTime.cs
- SymbolMethod.cs
- SimpleMailWebEventProvider.cs
- InstanceStoreQueryResult.cs
- OleDbConnectionFactory.cs
- UriExt.cs
- PeerPresenceInfo.cs
- DataGridViewCellEventArgs.cs
- IdnElement.cs
- ViewGenerator.cs
- HttpPostedFile.cs
- MessageQueueInstaller.cs
- ExpressionBindingCollection.cs
- InlineCollection.cs
- PixelFormatConverter.cs
- SqlConnectionPoolGroupProviderInfo.cs
- ComplexBindingPropertiesAttribute.cs
- FileNotFoundException.cs
- CryptoProvider.cs
- HttpHandlerActionCollection.cs
- RunWorkerCompletedEventArgs.cs
- DataGridItemEventArgs.cs
- PointAnimationClockResource.cs
- WindowsStatic.cs
- ServiceManager.cs
- contentDescriptor.cs
- XhtmlBasicFormAdapter.cs
- DateTimePicker.cs
- _Semaphore.cs
- CodeObject.cs
- NavigationProperty.cs
- ValidationSummary.cs
- DataGridTableCollection.cs
- SystemResources.cs
- BasePattern.cs