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
- FileDialogCustomPlace.cs
- ReaderWriterLock.cs
- ProxyWebPartManager.cs
- SafeRegistryHandle.cs
- Animatable.cs
- Point3DAnimation.cs
- MexTcpBindingElement.cs
- UnmanagedMemoryStreamWrapper.cs
- FormViewDeleteEventArgs.cs
- XmlArrayAttribute.cs
- RootDesignerSerializerAttribute.cs
- WebPartEditorOkVerb.cs
- DataGridColumnCollection.cs
- ProgressChangedEventArgs.cs
- PropertyPath.cs
- EdmRelationshipRoleAttribute.cs
- SafeIUnknown.cs
- DateTimeFormatInfoScanner.cs
- QilSortKey.cs
- InvariantComparer.cs
- ResourceReferenceExpressionConverter.cs
- X509SecurityTokenAuthenticator.cs
- MessageBox.cs
- CodeGeneratorOptions.cs
- ScriptingWebServicesSectionGroup.cs
- ContextStack.cs
- ModuleBuilderData.cs
- CodeEntryPointMethod.cs
- ResourceDescriptionAttribute.cs
- __ComObject.cs
- WindowsPen.cs
- IteratorDescriptor.cs
- Assembly.cs
- ExpressionPrefixAttribute.cs
- NetTcpSectionData.cs
- ObjectReaderCompiler.cs
- EventBookmark.cs
- AudioException.cs
- PrimitiveType.cs
- QilXmlReader.cs
- RemoveStoryboard.cs
- MediaElementAutomationPeer.cs
- FixedLineResult.cs
- XmlConvert.cs
- DataGridViewLinkCell.cs
- TrimSurroundingWhitespaceAttribute.cs
- HttpProfileGroupBase.cs
- StyleSelector.cs
- ReliableOutputSessionChannel.cs
- ReferenceEqualityComparer.cs
- ReferencedType.cs
- SynchronizationLockException.cs
- ProviderConnectionPoint.cs
- ProtocolsSection.cs
- HtmlTableCellCollection.cs
- Point3DAnimationBase.cs
- HwndTarget.cs
- DateTime.cs
- TableLayout.cs
- StringCollection.cs
- LeafCellTreeNode.cs
- XmlQueryCardinality.cs
- Byte.cs
- MailWriter.cs
- AppDomain.cs
- FieldDescriptor.cs
- MemoryStream.cs
- VerificationAttribute.cs
- ISAPIRuntime.cs
- DPTypeDescriptorContext.cs
- MessageBox.cs
- SmiConnection.cs
- ListDictionaryInternal.cs
- SessionPageStatePersister.cs
- Token.cs
- HtmlHead.cs
- CleanUpVirtualizedItemEventArgs.cs
- Decimal.cs
- DataGridViewSelectedCellCollection.cs
- ParentQuery.cs
- Vector3DCollectionConverter.cs
- JavaScriptString.cs
- Registry.cs
- SecurityTokenAuthenticator.cs
- HttpFileCollection.cs
- VisualBrush.cs
- CapiHashAlgorithm.cs
- DateTimeConverter.cs
- PartBasedPackageProperties.cs
- SplitContainer.cs
- WorkflowMarkupSerializationException.cs
- MessageBodyMemberAttribute.cs
- TextTreePropertyUndoUnit.cs
- StringBlob.cs
- KnownTypeAttribute.cs
- OrderablePartitioner.cs
- ResourceExpressionBuilder.cs
- OracleCommandSet.cs
- IEnumerable.cs
- ProcessStartInfo.cs