Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- KnownTypesProvider.cs
- RemoveFromCollection.cs
- HashAlgorithm.cs
- ListViewContainer.cs
- BufferedGraphicsManager.cs
- ThreadStaticAttribute.cs
- Lease.cs
- DictionaryTraceRecord.cs
- DefaultPropertyAttribute.cs
- securitycriticaldataClass.cs
- ProfileInfo.cs
- BamlRecordHelper.cs
- MostlySingletonList.cs
- SmtpAuthenticationManager.cs
- BitSet.cs
- StringUtil.cs
- XmlQueryType.cs
- WmpBitmapEncoder.cs
- ValueTable.cs
- GAC.cs
- XmlSchemaSimpleType.cs
- dsa.cs
- MD5CryptoServiceProvider.cs
- ScrollItemPatternIdentifiers.cs
- ClientFormsIdentity.cs
- DragDrop.cs
- COM2Properties.cs
- TableProviderWrapper.cs
- WrappedIUnknown.cs
- MultipartIdentifier.cs
- Style.cs
- BridgeDataRecord.cs
- SchemaExporter.cs
- SrgsRulesCollection.cs
- CodeCompileUnit.cs
- BulletDecorator.cs
- LeafCellTreeNode.cs
- DetailsViewDeleteEventArgs.cs
- ResourcePool.cs
- BitmapData.cs
- StaticExtensionConverter.cs
- NativeMethods.cs
- ASCIIEncoding.cs
- MenuItemCollection.cs
- basecomparevalidator.cs
- CodeDomDecompiler.cs
- ColumnPropertiesGroup.cs
- CacheMemory.cs
- XmlSchemaExternal.cs
- TemplateColumn.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- DataTemplate.cs
- Identifier.cs
- ValidatorCollection.cs
- PrivateFontCollection.cs
- Column.cs
- RemoteWebConfigurationHostServer.cs
- RefExpr.cs
- IdentityModelStringsVersion1.cs
- SqlNodeAnnotation.cs
- WinFormsSecurity.cs
- GeometryValueSerializer.cs
- ComplexObject.cs
- Page.cs
- ProfilePropertySettings.cs
- MonthChangedEventArgs.cs
- CodeRegionDirective.cs
- ConfigXmlAttribute.cs
- GroupByQueryOperator.cs
- NodeLabelEditEvent.cs
- Int16Converter.cs
- TrustLevel.cs
- RC2.cs
- HybridWebProxyFinder.cs
- TypeElementCollection.cs
- SchemaCollectionCompiler.cs
- HttpCookie.cs
- XmlCollation.cs
- TypeForwardedToAttribute.cs
- TextEffectCollection.cs
- KeyboardNavigation.cs
- FtpRequestCacheValidator.cs
- QuotaExceededException.cs
- ControlParameter.cs
- NotSupportedException.cs
- AjaxFrameworkAssemblyAttribute.cs
- OdbcErrorCollection.cs
- XmlConvert.cs
- DodSequenceMerge.cs
- SmiXetterAccessMap.cs
- SessionEndedEventArgs.cs
- WindowsSecurityTokenAuthenticator.cs
- HtmlTableRowCollection.cs
- StringInfo.cs
- StreamInfo.cs
- EventLogException.cs
- WebResponse.cs
- GrammarBuilder.cs
- HtmlElementEventArgs.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs