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;
///
///
/// [To be supplied.]
///
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;
}
///
///
/// 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;
///
///
/// [To be supplied.]
///
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;
}
///
///
/// 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
- DataRowChangeEvent.cs
- HttpListenerException.cs
- DeadCharTextComposition.cs
- PlacementWorkspace.cs
- KoreanLunisolarCalendar.cs
- Int32EqualityComparer.cs
- TextEditorTyping.cs
- RemotingConfigParser.cs
- thaishape.cs
- PathSegmentCollection.cs
- MemoryMappedFile.cs
- Ref.cs
- DeferredElementTreeState.cs
- PenContexts.cs
- FormsAuthenticationConfiguration.cs
- CredentialCache.cs
- KeyedHashAlgorithm.cs
- Rijndael.cs
- CommandDevice.cs
- RectValueSerializer.cs
- LocationSectionRecord.cs
- QueueAccessMode.cs
- StructuralObject.cs
- TemplateXamlTreeBuilder.cs
- DbInsertCommandTree.cs
- EventTrigger.cs
- NullableConverter.cs
- BuildResult.cs
- DockPatternIdentifiers.cs
- WebServiceParameterData.cs
- ResourceDefaultValueAttribute.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- SecurityVerifiedMessage.cs
- SqlFactory.cs
- ObjectDataSourceSelectingEventArgs.cs
- TemplatedAdorner.cs
- ArrayExtension.cs
- IISMapPath.cs
- streamingZipPartStream.cs
- ClientType.cs
- StateMachineDesignerPaint.cs
- BaseCodePageEncoding.cs
- ContentIterators.cs
- ConfigurationSchemaErrors.cs
- AutoResizedEvent.cs
- CodeBlockBuilder.cs
- MetadataUtilsSmi.cs
- SystemIPInterfaceProperties.cs
- DataListItem.cs
- ModelPerspective.cs
- AudioDeviceOut.cs
- DataServiceHost.cs
- ButtonPopupAdapter.cs
- ManualResetEvent.cs
- SqlPersonalizationProvider.cs
- BitmapEffectGroup.cs
- DynamicResourceExtension.cs
- SecurityTokenValidationException.cs
- OverflowException.cs
- FocusWithinProperty.cs
- Rfc2898DeriveBytes.cs
- TrustLevelCollection.cs
- Suspend.cs
- CodeGen.cs
- Pens.cs
- SpeechAudioFormatInfo.cs
- SQLSingle.cs
- XmlObjectSerializerContext.cs
- GeometryHitTestResult.cs
- AddInController.cs
- TimersDescriptionAttribute.cs
- HttpModuleAction.cs
- SqlConnectionHelper.cs
- ControllableStoryboardAction.cs
- ListBoxDesigner.cs
- OutputCacheProfileCollection.cs
- ParseNumbers.cs
- XmlElementElementCollection.cs
- ServiceDescriptionData.cs
- RTLAwareMessageBox.cs
- FileDialog.cs
- AutomationPatternInfo.cs
- BindableTemplateBuilder.cs
- WebPartConnectionsCancelVerb.cs
- XmlCollation.cs
- FieldNameLookup.cs
- MemoryMappedViewAccessor.cs
- ImageSource.cs
- SequenceRange.cs
- MulticastIPAddressInformationCollection.cs
- Style.cs
- CqlParser.cs
- DesignerHelpers.cs
- ServicesExceptionNotHandledEventArgs.cs
- InstanceLockQueryResult.cs
- panel.cs
- ReflectionHelper.cs
- PropertyNames.cs
- DropDownButton.cs
- SmtpClient.cs