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
- RegexWorker.cs
- SessionState.cs
- UriScheme.cs
- SrgsRulesCollection.cs
- BindableAttribute.cs
- DataRelationCollection.cs
- SelectedDatesCollection.cs
- Win32SafeHandles.cs
- ScaleTransform.cs
- TableParaClient.cs
- BulletedList.cs
- SafeLocalMemHandle.cs
- PageAdapter.cs
- FormatterServices.cs
- ToolboxBitmapAttribute.cs
- KeyedCollection.cs
- NonBatchDirectoryCompiler.cs
- DesignerHost.cs
- UpdateCompiler.cs
- TokenBasedSet.cs
- ClientScriptManager.cs
- BasicExpandProvider.cs
- IndexOutOfRangeException.cs
- XmlSchemaSequence.cs
- SpecialTypeDataContract.cs
- DataGridLengthConverter.cs
- DBCommandBuilder.cs
- EntityException.cs
- adornercollection.cs
- CustomValidator.cs
- Hashtable.cs
- EventData.cs
- UIPropertyMetadata.cs
- XslVisitor.cs
- CalloutQueueItem.cs
- DisplayMemberTemplateSelector.cs
- ClientSettingsProvider.cs
- SafeProcessHandle.cs
- Point3D.cs
- DocumentGrid.cs
- SystemTcpStatistics.cs
- UnescapedXmlDiagnosticData.cs
- Normalizer.cs
- XmlSchemaRedefine.cs
- TreeChangeInfo.cs
- EventLog.cs
- ServiceObjectContainer.cs
- GPRECT.cs
- Hyperlink.cs
- PingOptions.cs
- TdsValueSetter.cs
- SingleSelectRootGridEntry.cs
- LineServices.cs
- FontStyles.cs
- ObservableCollection.cs
- StorageTypeMapping.cs
- ChineseLunisolarCalendar.cs
- XPathNodeIterator.cs
- StructuralType.cs
- DesignOnlyAttribute.cs
- InvalidOleVariantTypeException.cs
- DbProviderConfigurationHandler.cs
- GregorianCalendar.cs
- XmlDocumentType.cs
- BuildDependencySet.cs
- SQLMembershipProvider.cs
- OracleDataAdapter.cs
- TemplateBindingExpressionConverter.cs
- XmlObjectSerializerContext.cs
- ApplicationSecurityManager.cs
- PageAsyncTask.cs
- RuleSettings.cs
- ToolboxSnapDragDropEventArgs.cs
- X509CertificateCollection.cs
- WebPartEditorOkVerb.cs
- Native.cs
- FormViewDesigner.cs
- InstanceLockException.cs
- TargetException.cs
- AliasedSlot.cs
- ListViewGroupItemCollection.cs
- SingletonChannelAcceptor.cs
- PartitionedStream.cs
- DataListItem.cs
- ChangeToolStripParentVerb.cs
- XmlSubtreeReader.cs
- FixedSchema.cs
- TextDecorationCollection.cs
- SessionIDManager.cs
- TableRowGroup.cs
- PropertyValueChangedEvent.cs
- BitmapCodecInfo.cs
- HttpListenerRequest.cs
- BitmapEffectGroup.cs
- FileCodeGroup.cs
- UnsafeNativeMethods.cs
- ActivityWithResultWrapper.cs
- TreeViewAutomationPeer.cs
- PeerNearMe.cs
- RemotingServices.cs