Code:
/ FX-1434 / FX-1434 / 1.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
- DbMetaDataCollectionNames.cs
- HyperLink.cs
- MarshalDirectiveException.cs
- UIAgentAsyncBeginRequest.cs
- AgileSafeNativeMemoryHandle.cs
- Attribute.cs
- TripleDESCryptoServiceProvider.cs
- SmiXetterAccessMap.cs
- CompensatableTransactionScopeActivity.cs
- GetRecipientListRequest.cs
- VScrollBar.cs
- ObjectQuery.cs
- FigureParaClient.cs
- AutomationProperties.cs
- EntityContainerRelationshipSetEnd.cs
- PenCursorManager.cs
- BaseTemplateParser.cs
- UseAttributeSetsAction.cs
- ConfigXmlCDataSection.cs
- login.cs
- RouteData.cs
- XmlWrappingReader.cs
- XPathNavigator.cs
- OleDbConnectionFactory.cs
- CompositeControlDesigner.cs
- PropertyGridCommands.cs
- TrustExchangeException.cs
- Misc.cs
- VisualCollection.cs
- SqlProcedureAttribute.cs
- HitTestParameters3D.cs
- RangeValueProviderWrapper.cs
- FilteredDataSetHelper.cs
- UdpDiscoveryEndpointProvider.cs
- _NetworkingPerfCounters.cs
- DataGridViewButtonCell.cs
- TreeViewCancelEvent.cs
- WpfWebRequestHelper.cs
- ProcessHostConfigUtils.cs
- StrokeCollectionDefaultValueFactory.cs
- StickyNote.cs
- Predicate.cs
- ExtensionFile.cs
- Package.cs
- ProfileParameter.cs
- TextServicesLoader.cs
- EncoderExceptionFallback.cs
- CustomErrorsSection.cs
- TitleStyle.cs
- SharedUtils.cs
- DataGridViewCellStyleEditor.cs
- PositiveTimeSpanValidator.cs
- MediaPlayerState.cs
- DynamicValueConverter.cs
- diagnosticsswitches.cs
- cryptoapiTransform.cs
- UxThemeWrapper.cs
- CodeTryCatchFinallyStatement.cs
- AsnEncodedData.cs
- CodeGroup.cs
- Trigger.cs
- DrawingCollection.cs
- DefaultEvaluationContext.cs
- LinqDataSourceUpdateEventArgs.cs
- MemoryPressure.cs
- PropertyDescriptorCollection.cs
- SByte.cs
- EditorZone.cs
- FixedSOMPageConstructor.cs
- AudioException.cs
- CodeGroup.cs
- UdpChannelFactory.cs
- HtmlInputCheckBox.cs
- WorkflowMarkupSerializationException.cs
- WhereQueryOperator.cs
- DelegateBodyWriter.cs
- InvalidCardException.cs
- ResizeGrip.cs
- RestHandlerFactory.cs
- propertyentry.cs
- GridViewSelectEventArgs.cs
- SqlCacheDependencyDatabase.cs
- HtmlPhoneCallAdapter.cs
- AccessViolationException.cs
- CustomAttributeSerializer.cs
- SamlSubject.cs
- MSAAWinEventWrap.cs
- basecomparevalidator.cs
- PtsContext.cs
- XmlTypeMapping.cs
- ResourceBinder.cs
- MeasureData.cs
- __TransparentProxy.cs
- OutOfProcStateClientManager.cs
- UnknownBitmapEncoder.cs
- PopOutPanel.cs
- ValidationSummaryDesigner.cs
- ProxyWebPart.cs
- Button.cs
- AlignmentYValidation.cs