Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- OutputWindow.cs
- CredentialCache.cs
- LineServicesRun.cs
- XamlPoint3DCollectionSerializer.cs
- DesignerForm.cs
- TraceProvider.cs
- XmlAttribute.cs
- RuntimeCompatibilityAttribute.cs
- XPathNodeHelper.cs
- DiscreteKeyFrames.cs
- VisualBasic.cs
- LogLogRecordEnumerator.cs
- SQLUtility.cs
- ContractMapping.cs
- ContentAlignmentEditor.cs
- Helper.cs
- SessionStateModule.cs
- AppDomain.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- DesignerHierarchicalDataSourceView.cs
- SerialErrors.cs
- AsynchronousChannel.cs
- GenericsInstances.cs
- IncrementalCompileAnalyzer.cs
- ControlPersister.cs
- SimpleBitVector32.cs
- StackBuilderSink.cs
- CharacterMetrics.cs
- CacheOutputQuery.cs
- SamlNameIdentifierClaimResource.cs
- ExcCanonicalXml.cs
- MarginCollapsingState.cs
- QueryStringParameter.cs
- WebPart.cs
- Registry.cs
- ArrayElementGridEntry.cs
- ToolStripMenuItemDesigner.cs
- SystemDropShadowChrome.cs
- XamlValidatingReader.cs
- FileNameEditor.cs
- TextShapeableCharacters.cs
- PasswordTextContainer.cs
- MultipartContentParser.cs
- OleDbSchemaGuid.cs
- WindowsImpersonationContext.cs
- XmlHierarchicalEnumerable.cs
- HtmlEncodedRawTextWriter.cs
- PagesSection.cs
- DependencyPropertyHelper.cs
- ShaderEffect.cs
- StickyNoteHelper.cs
- SerializationObjectManager.cs
- Aes.cs
- DbException.cs
- TextBoxAutoCompleteSourceConverter.cs
- SecurityTokenSerializer.cs
- DataControlFieldHeaderCell.cs
- SharedPersonalizationStateInfo.cs
- DesignerRegion.cs
- RequestTimeoutManager.cs
- ExtendedPropertyCollection.cs
- _KerberosClient.cs
- DataSourceView.cs
- OdbcEnvironmentHandle.cs
- AlphabetConverter.cs
- X509InitiatorCertificateClientElement.cs
- LabelInfo.cs
- Group.cs
- RuleConditionDialog.Designer.cs
- EntityDataSourceDesignerHelper.cs
- XmlTypeMapping.cs
- FileLoadException.cs
- WindowsSolidBrush.cs
- RewritingPass.cs
- SerializationEventsCache.cs
- TreeNodeStyle.cs
- AddInAdapter.cs
- SchemaContext.cs
- NestPullup.cs
- WebReferencesBuildProvider.cs
- LoaderAllocator.cs
- MobileCategoryAttribute.cs
- DataGridViewCellConverter.cs
- AlignmentYValidation.cs
- SqlCacheDependencySection.cs
- IsolatedStorageException.cs
- SecurityRuntime.cs
- Transform.cs
- SHA1CryptoServiceProvider.cs
- PrintControllerWithStatusDialog.cs
- StringReader.cs
- RegexRunner.cs
- SqlServer2KCompatibilityAnnotation.cs
- ExtenderProvidedPropertyAttribute.cs
- XslNumber.cs
- DirectoryInfo.cs
- VisualCollection.cs
- MetaData.cs
- BookmarkNameHelper.cs
- JsonGlobals.cs