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
- CounterSample.cs
- Part.cs
- TreeViewHitTestInfo.cs
- CroppedBitmap.cs
- HttpHandlerAction.cs
- Sequence.cs
- TakeOrSkipWhileQueryOperator.cs
- SortDescription.cs
- PlatformCulture.cs
- XmlSchemaAttribute.cs
- EventRouteFactory.cs
- ImageMapEventArgs.cs
- EmptyImpersonationContext.cs
- IDQuery.cs
- ScriptControlDescriptor.cs
- ZoneIdentityPermission.cs
- HtmlTable.cs
- FolderBrowserDialog.cs
- RSAOAEPKeyExchangeFormatter.cs
- wgx_sdk_version.cs
- Quaternion.cs
- InvokeMethodActivityDesigner.cs
- CodeCastExpression.cs
- BigInt.cs
- SelectQueryOperator.cs
- PseudoWebRequest.cs
- DbInsertCommandTree.cs
- XsdCachingReader.cs
- ProtocolsSection.cs
- XmlNamespaceMapping.cs
- ChannelManager.cs
- DynamicUpdateCommand.cs
- HttpAsyncResult.cs
- SmiEventSink_DeferedProcessing.cs
- Vector3DAnimationUsingKeyFrames.cs
- Deserializer.cs
- StringUtil.cs
- DbConnectionPoolIdentity.cs
- TCPListener.cs
- WebPartConnectionsCloseVerb.cs
- FormViewRow.cs
- NameValueCollection.cs
- DataGridColumnHeaderCollection.cs
- InternalConfigConfigurationFactory.cs
- DesignerAttribute.cs
- ConditionalExpression.cs
- ContentElement.cs
- CodeGen.cs
- ValueOfAction.cs
- Int16KeyFrameCollection.cs
- MenuCommand.cs
- WebPartDescription.cs
- XsdDataContractExporter.cs
- EndpointInfo.cs
- QueuePathEditor.cs
- Translator.cs
- PrivateFontCollection.cs
- OleDbInfoMessageEvent.cs
- EdmItemError.cs
- FormViewInsertedEventArgs.cs
- ToolStripMenuItem.cs
- FillBehavior.cs
- LOSFormatter.cs
- Control.cs
- TdsValueSetter.cs
- ActiveXHost.cs
- EntityDescriptor.cs
- NavigationWindowAutomationPeer.cs
- SchemaImporterExtension.cs
- MetadataCache.cs
- StringComparer.cs
- DataServiceQuery.cs
- OleDbSchemaGuid.cs
- AuthenticationServiceManager.cs
- AssemblyCache.cs
- Metadata.cs
- ReversePositionQuery.cs
- DataGridPageChangedEventArgs.cs
- CodeDelegateInvokeExpression.cs
- RowParagraph.cs
- ObjectToken.cs
- PartialCachingControl.cs
- SqlDataSourceCache.cs
- ImageSourceConverter.cs
- GridEntryCollection.cs
- XmlSchema.cs
- StringPropertyBuilder.cs
- Decoder.cs
- StyleSheetDesigner.cs
- EntityDataSourceSelectedEventArgs.cs
- TdsParserSessionPool.cs
- RuntimeConfigLKG.cs
- BindingExpressionBase.cs
- EdmFunctionAttribute.cs
- StopRoutingHandler.cs
- UnsafePeerToPeerMethods.cs
- Gdiplus.cs
- SafeReversePInvokeHandle.cs
- Soap12ProtocolReflector.cs
- GACIdentityPermission.cs