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
- EdgeModeValidation.cs
- DataControlFieldHeaderCell.cs
- ReadOnlyKeyedCollection.cs
- FileIOPermission.cs
- TdsParameterSetter.cs
- StrokeNodeOperations.cs
- CustomPopupPlacement.cs
- SingleTagSectionHandler.cs
- XPathNodeInfoAtom.cs
- ResourcePool.cs
- ComponentEditorForm.cs
- ObjectItemCachedAssemblyLoader.cs
- UpWmlPageAdapter.cs
- DetailsViewPagerRow.cs
- RightsManagementErrorHandler.cs
- EntryPointNotFoundException.cs
- DrawingBrush.cs
- StrokeNodeEnumerator.cs
- File.cs
- WmpBitmapEncoder.cs
- EventMetadata.cs
- ConnectionPointCookie.cs
- CodeIterationStatement.cs
- SqlDataSourceSelectingEventArgs.cs
- Processor.cs
- DataServiceSaveChangesEventArgs.cs
- ClientApiGenerator.cs
- OpCellTreeNode.cs
- XmlILAnnotation.cs
- ObjectAssociationEndMapping.cs
- Math.cs
- WindowsFormsHostPropertyMap.cs
- ValueExpressions.cs
- ToolTipService.cs
- SqlIdentifier.cs
- _SslState.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- HtmlMobileTextWriter.cs
- SQLInt32Storage.cs
- InputLanguage.cs
- TreeViewEvent.cs
- WindowVisualStateTracker.cs
- DynamicQueryableWrapper.cs
- ConfigurationSection.cs
- FunctionUpdateCommand.cs
- MD5.cs
- CompositeFontParser.cs
- SwitchAttribute.cs
- RichTextBoxDesigner.cs
- GridViewRow.cs
- PriorityItem.cs
- MenuStrip.cs
- StringFunctions.cs
- BamlMapTable.cs
- ToolStripScrollButton.cs
- QilValidationVisitor.cs
- ACE.cs
- ClassDataContract.cs
- CapabilitiesRule.cs
- WebConfigurationFileMap.cs
- SymmetricKeyWrap.cs
- _IPv4Address.cs
- CustomErrorsSection.cs
- SessionEndingEventArgs.cs
- CollectionChangeEventArgs.cs
- XmlSchemaInclude.cs
- latinshape.cs
- HtmlInputFile.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- IsolatedStorage.cs
- DrawingAttributeSerializer.cs
- MenuBase.cs
- WebPartDisplayModeCollection.cs
- ProxyAssemblyNotLoadedException.cs
- DescendentsWalker.cs
- PerfCounterSection.cs
- AudienceUriMode.cs
- XMLUtil.cs
- VectorAnimationUsingKeyFrames.cs
- TriggerCollection.cs
- ScalarType.cs
- ThemeDirectoryCompiler.cs
- Schema.cs
- WorkflowQueue.cs
- TreeNodeBindingDepthConverter.cs
- TableDesigner.cs
- ColorConvertedBitmapExtension.cs
- XPathChildIterator.cs
- SafeFileHandle.cs
- ThemeDictionaryExtension.cs
- ContentPresenter.cs
- SettingsPropertyWrongTypeException.cs
- CharUnicodeInfo.cs
- SelectionGlyphBase.cs
- MissingSatelliteAssemblyException.cs
- ConfigurationStrings.cs
- AdjustableArrowCap.cs
- ScriptReference.cs
- BindingMemberInfo.cs
- DocumentPage.cs