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
- MachineKeyConverter.cs
- xdrvalidator.cs
- XamlBuildTaskServices.cs
- ScrollViewer.cs
- X509ScopedServiceCertificateElement.cs
- ConfigurationLocation.cs
- AttributeProviderAttribute.cs
- SHA384.cs
- Expressions.cs
- ClientScriptManagerWrapper.cs
- GridSplitter.cs
- AmbientValueAttribute.cs
- ToolStripSettings.cs
- WebPartEditorCancelVerb.cs
- DecoderBestFitFallback.cs
- WebPartDisplayMode.cs
- Window.cs
- SqlNodeAnnotation.cs
- DataGridCellAutomationPeer.cs
- GridViewUpdateEventArgs.cs
- XPathScanner.cs
- PrintPreviewGraphics.cs
- EmbeddedMailObjectsCollection.cs
- EntityClassGenerator.cs
- XmlSchemaImport.cs
- InputLangChangeRequestEvent.cs
- SiteMapNodeItem.cs
- AttributeSetAction.cs
- XsltFunctions.cs
- ICspAsymmetricAlgorithm.cs
- BindingObserver.cs
- TextFormatterImp.cs
- Timeline.cs
- ScriptReferenceBase.cs
- UnknownWrapper.cs
- SettingsAttributes.cs
- CompiledQueryCacheKey.cs
- SupportingTokenBindingElement.cs
- RedirectionProxy.cs
- WindowsFormsSynchronizationContext.cs
- NullRuntimeConfig.cs
- CapabilitiesAssignment.cs
- SafeNativeMethods.cs
- GridViewColumnHeader.cs
- DataFieldConverter.cs
- HasCopySemanticsAttribute.cs
- AsyncContentLoadedEventArgs.cs
- Encoder.cs
- Pkcs9Attribute.cs
- WbemProvider.cs
- EmissiveMaterial.cs
- ReflectionPermission.cs
- TrackBar.cs
- ActiveXSerializer.cs
- AuthenticodeSignatureInformation.cs
- StringToken.cs
- ContactManager.cs
- ParsedAttributeCollection.cs
- CompressedStack.cs
- AuthenticationModuleElementCollection.cs
- ConstraintConverter.cs
- GridViewPageEventArgs.cs
- CssClassPropertyAttribute.cs
- TreeWalkHelper.cs
- XsltQilFactory.cs
- DynamicQueryStringParameter.cs
- ButtonStandardAdapter.cs
- BufferedReadStream.cs
- Matrix.cs
- DbMetaDataCollectionNames.cs
- ExpandedWrapper.cs
- SortDescriptionCollection.cs
- _NegoState.cs
- Thread.cs
- SimplePropertyEntry.cs
- GlyphsSerializer.cs
- ToolStripSettings.cs
- DiagnosticsConfigurationHandler.cs
- ByteKeyFrameCollection.cs
- Binding.cs
- DocumentStream.cs
- BreakSafeBase.cs
- SiteOfOriginContainer.cs
- HelpEvent.cs
- RemotingConfigParser.cs
- OracleTransaction.cs
- AnnotationMap.cs
- basemetadatamappingvisitor.cs
- DoubleConverter.cs
- NativeMethods.cs
- DataGridItemEventArgs.cs
- DocumentPageHost.cs
- control.ime.cs
- LambdaCompiler.Unary.cs
- ServiceHostingEnvironmentSection.cs
- TextTreeInsertElementUndoUnit.cs
- GridViewDeletedEventArgs.cs
- AddInSegmentDirectoryNotFoundException.cs
- ObjectHandle.cs
- ViewCellSlot.cs