Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- AsyncOperationManager.cs
- ExtenderControl.cs
- TextTreeNode.cs
- RowToFieldTransformer.cs
- Random.cs
- TypeBuilderInstantiation.cs
- PointAnimation.cs
- DependencyProperty.cs
- PerformanceCounterManager.cs
- TypeHelpers.cs
- AnnotationHighlightLayer.cs
- SmtpDateTime.cs
- InstanceContextMode.cs
- DPCustomTypeDescriptor.cs
- GACIdentityPermission.cs
- Task.cs
- TreeNode.cs
- DataColumnCollection.cs
- safex509handles.cs
- QuaternionValueSerializer.cs
- XmlQueryType.cs
- Transform3DCollection.cs
- AuthenticationConfig.cs
- ProviderSettings.cs
- ResourceReferenceExpressionConverter.cs
- GenericEnumerator.cs
- IPHostEntry.cs
- StrongNameKeyPair.cs
- Normalization.cs
- TableCell.cs
- Delegate.cs
- FixedDocumentSequencePaginator.cs
- BindingContext.cs
- Point3D.cs
- WebPartsPersonalization.cs
- AbstractSvcMapFileLoader.cs
- AsyncCodeActivityContext.cs
- MouseEvent.cs
- HttpProxyTransportBindingElement.cs
- RuntimeEnvironment.cs
- NodeCounter.cs
- CryptoApi.cs
- CultureInfo.cs
- RegionData.cs
- SqlBulkCopyColumnMapping.cs
- ThreadStateException.cs
- XmlSignificantWhitespace.cs
- ParsedAttributeCollection.cs
- ByteStreamMessageUtility.cs
- AnimationClockResource.cs
- ConsumerConnectionPoint.cs
- PrimaryKeyTypeConverter.cs
- Comparer.cs
- DecoderExceptionFallback.cs
- Queue.cs
- WorkflowViewStateService.cs
- IdleTimeoutMonitor.cs
- LayoutInformation.cs
- PatternMatcher.cs
- WindowsListViewItemCheckBox.cs
- EmbeddedMailObject.cs
- _RegBlobWebProxyDataBuilder.cs
- InfiniteIntConverter.cs
- DPTypeDescriptorContext.cs
- WindowInteropHelper.cs
- AspCompat.cs
- PropertyValueUIItem.cs
- GeneralTransform3D.cs
- MimeImporter.cs
- ToolBar.cs
- MasterPageCodeDomTreeGenerator.cs
- ErrorHandler.cs
- CodeRemoveEventStatement.cs
- KnownBoxes.cs
- SelectManyQueryOperator.cs
- TableLayoutColumnStyleCollection.cs
- SchemaImporterExtension.cs
- DataGridHeaderBorder.cs
- PlainXmlWriter.cs
- RecognizeCompletedEventArgs.cs
- RightNameExpirationInfoPair.cs
- IPAddress.cs
- ModuleBuilder.cs
- DataSourceXmlAttributeAttribute.cs
- UnsafeNativeMethodsPenimc.cs
- XamlToRtfWriter.cs
- NotifyCollectionChangedEventArgs.cs
- MostlySingletonList.cs
- _HeaderInfoTable.cs
- ArglessEventHandlerProxy.cs
- DataObjectMethodAttribute.cs
- _SpnDictionary.cs
- Border.cs
- WebEvents.cs
- FunctionDetailsReader.cs
- GridToolTip.cs
- DataControlReference.cs
- Registry.cs
- DetailsViewInsertEventArgs.cs
- HtmlTable.cs