Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ToolStripItemImageRenderEventArgs.cs
- UpdateManifestForBrowserApplication.cs
- GradientStop.cs
- RangeValidator.cs
- Gdiplus.cs
- SessionParameter.cs
- SerializerProvider.cs
- TableHeaderCell.cs
- XmlNullResolver.cs
- SecurityTokenException.cs
- MultipartContentParser.cs
- DocobjHost.cs
- Page.cs
- CustomAssemblyResolver.cs
- DrawingAttributeSerializer.cs
- FrameworkElement.cs
- ListControlDataBindingHandler.cs
- SrgsToken.cs
- XamlPoint3DCollectionSerializer.cs
- XPathMultyIterator.cs
- AsnEncodedData.cs
- CursorConverter.cs
- InvalidWMPVersionException.cs
- StateDesigner.Helpers.cs
- AuthenticationConfig.cs
- GeometryModel3D.cs
- CFStream.cs
- RandomNumberGenerator.cs
- Parser.cs
- RestHandlerFactory.cs
- ShaderRenderModeValidation.cs
- PropertyGroupDescription.cs
- _UriTypeConverter.cs
- RightsManagementPermission.cs
- WebSysDisplayNameAttribute.cs
- TextViewSelectionProcessor.cs
- AxisAngleRotation3D.cs
- PersonalizationProviderCollection.cs
- ElementsClipboardData.cs
- URI.cs
- MsmqInputMessagePool.cs
- HtmlInputImage.cs
- XPathExpr.cs
- ThousandthOfEmRealDoubles.cs
- ApplicationContext.cs
- OdbcEnvironment.cs
- StateWorkerRequest.cs
- ActiveDesignSurfaceEvent.cs
- Form.cs
- RequiredAttributeAttribute.cs
- EntityContainerAssociationSet.cs
- DbXmlEnabledProviderManifest.cs
- DBCSCodePageEncoding.cs
- PartialTrustVisibleAssemblyCollection.cs
- Utils.cs
- XmlSchemaSequence.cs
- RequestCacheEntry.cs
- FormClosingEvent.cs
- arclist.cs
- TypedTableBase.cs
- XmlEventCache.cs
- TransactionScope.cs
- JavaScriptSerializer.cs
- GridViewSortEventArgs.cs
- StaticFileHandler.cs
- PageThemeBuildProvider.cs
- ParameterBuilder.cs
- PolicyException.cs
- HtmlTableCell.cs
- UnsafeNetInfoNativeMethods.cs
- DescendentsWalkerBase.cs
- Synchronization.cs
- FormsAuthenticationCredentials.cs
- SequenceQuery.cs
- ColumnReorderedEventArgs.cs
- WriteTimeStream.cs
- SqlColumnizer.cs
- ProtectedConfigurationSection.cs
- EdmProperty.cs
- PerfCounters.cs
- SpellCheck.cs
- FileLevelControlBuilderAttribute.cs
- ZipFileInfo.cs
- ParserHooks.cs
- BufferedGraphicsManager.cs
- EntityDataSourceContainerNameItem.cs
- TrackingMemoryStreamFactory.cs
- AutoSizeToolBoxItem.cs
- DesignerAttribute.cs
- SamlAttribute.cs
- WebServiceEnumData.cs
- WebPartDisplayModeCancelEventArgs.cs
- DataGridViewColumnConverter.cs
- CharKeyFrameCollection.cs
- ApplyTemplatesAction.cs
- CalendarAutoFormat.cs
- ByteConverter.cs
- OperatorExpressions.cs
- QueueNameHelper.cs
- DataSourceControlBuilder.cs