Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewLayoutData.cs / 1305376 / DataGridViewLayoutData.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System.Drawing;
using System.Text;
namespace System.Windows.Forms
{
public partial class DataGridView
{
internal class LayoutData
{
internal bool dirty = true;
// used for resizing.
public Rectangle ClientRectangle = Rectangle.Empty;
// region inside the dataGridView's borders.
public Rectangle Inside = Rectangle.Empty;
// region occupied by row headers
public Rectangle RowHeaders = Rectangle.Empty;
// region occupied by column headers
public Rectangle ColumnHeaders = Rectangle.Empty;
// top left header cell
public Rectangle TopLeftHeader = Rectangle.Empty;
// region for the cells
public Rectangle Data = Rectangle.Empty;
// square connecting the two scrollbars
public Rectangle ResizeBoxRect = Rectangle.Empty;
public bool ColumnHeadersVisible;
public bool RowHeadersVisible;
public LayoutData()
{
}
public LayoutData(LayoutData src)
{
this.ClientRectangle = src.ClientRectangle;
this.TopLeftHeader = src.TopLeftHeader;
this.ColumnHeaders = src.ColumnHeaders;
this.RowHeaders = src.RowHeaders;
this.Inside = src.Inside;
this.Data = src.Data;
this.ResizeBoxRect = src.ResizeBoxRect;
this.ColumnHeadersVisible = src.ColumnHeadersVisible;
this.RowHeadersVisible = src.RowHeadersVisible;
}
public override string ToString()
{
StringBuilder sb = new StringBuilder(100);
sb.Append(base.ToString());
sb.Append(" { \n");
sb.Append("ClientRectangle = ");
sb.Append(ClientRectangle.ToString());
sb.Append('\n');
sb.Append("Inside = ");
sb.Append(Inside.ToString());
sb.Append('\n');
sb.Append("TopLeftHeader = ");
sb.Append(TopLeftHeader.ToString());
sb.Append('\n');
sb.Append("ColumnHeaders = ");
sb.Append(ColumnHeaders.ToString());
sb.Append('\n');
sb.Append("RowHeaders = ");
sb.Append(RowHeaders.ToString());
sb.Append('\n');
sb.Append("Data = ");
sb.Append(Data.ToString());
sb.Append('\n');
sb.Append("ResizeBoxRect = ");
sb.Append(ResizeBoxRect.ToString());
sb.Append('\n');
sb.Append("ColumnHeadersVisible = ");
sb.Append(ColumnHeadersVisible.ToString());
sb.Append('\n');
sb.Append("RowHeadersVisible = ");
sb.Append(RowHeadersVisible.ToString());
sb.Append(" }");
return sb.ToString();
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System.Drawing;
using System.Text;
namespace System.Windows.Forms
{
public partial class DataGridView
{
internal class LayoutData
{
internal bool dirty = true;
// used for resizing.
public Rectangle ClientRectangle = Rectangle.Empty;
// region inside the dataGridView's borders.
public Rectangle Inside = Rectangle.Empty;
// region occupied by row headers
public Rectangle RowHeaders = Rectangle.Empty;
// region occupied by column headers
public Rectangle ColumnHeaders = Rectangle.Empty;
// top left header cell
public Rectangle TopLeftHeader = Rectangle.Empty;
// region for the cells
public Rectangle Data = Rectangle.Empty;
// square connecting the two scrollbars
public Rectangle ResizeBoxRect = Rectangle.Empty;
public bool ColumnHeadersVisible;
public bool RowHeadersVisible;
public LayoutData()
{
}
public LayoutData(LayoutData src)
{
this.ClientRectangle = src.ClientRectangle;
this.TopLeftHeader = src.TopLeftHeader;
this.ColumnHeaders = src.ColumnHeaders;
this.RowHeaders = src.RowHeaders;
this.Inside = src.Inside;
this.Data = src.Data;
this.ResizeBoxRect = src.ResizeBoxRect;
this.ColumnHeadersVisible = src.ColumnHeadersVisible;
this.RowHeadersVisible = src.RowHeadersVisible;
}
public override string ToString()
{
StringBuilder sb = new StringBuilder(100);
sb.Append(base.ToString());
sb.Append(" { \n");
sb.Append("ClientRectangle = ");
sb.Append(ClientRectangle.ToString());
sb.Append('\n');
sb.Append("Inside = ");
sb.Append(Inside.ToString());
sb.Append('\n');
sb.Append("TopLeftHeader = ");
sb.Append(TopLeftHeader.ToString());
sb.Append('\n');
sb.Append("ColumnHeaders = ");
sb.Append(ColumnHeaders.ToString());
sb.Append('\n');
sb.Append("RowHeaders = ");
sb.Append(RowHeaders.ToString());
sb.Append('\n');
sb.Append("Data = ");
sb.Append(Data.ToString());
sb.Append('\n');
sb.Append("ResizeBoxRect = ");
sb.Append(ResizeBoxRect.ToString());
sb.Append('\n');
sb.Append("ColumnHeadersVisible = ");
sb.Append(ColumnHeadersVisible.ToString());
sb.Append('\n');
sb.Append("RowHeadersVisible = ");
sb.Append(RowHeadersVisible.ToString());
sb.Append(" }");
return sb.ToString();
}
}
}
}
// 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
- ControlPropertyNameConverter.cs
- Int16.cs
- _BufferOffsetSize.cs
- Internal.cs
- COM2ExtendedBrowsingHandler.cs
- ResolveMatchesMessage11.cs
- CTreeGenerator.cs
- ConfigurationPermission.cs
- HtmlInputButton.cs
- XPathItem.cs
- InternalPermissions.cs
- AbandonedMutexException.cs
- SecUtil.cs
- SocketElement.cs
- TableLayoutPanelCellPosition.cs
- DateTimeFormat.cs
- Visual3DCollection.cs
- SafeCryptoKeyHandle.cs
- PreservationFileReader.cs
- OdbcError.cs
- HttpModuleAction.cs
- RbTree.cs
- MenuAdapter.cs
- MimeWriter.cs
- PropertyGroupDescription.cs
- OleDbWrapper.cs
- ThreadStateException.cs
- _HeaderInfoTable.cs
- CriticalExceptions.cs
- ColumnMapVisitor.cs
- ListViewInsertEventArgs.cs
- ExternalFile.cs
- SdlChannelSink.cs
- RemoteWebConfigurationHostServer.cs
- BitmapSizeOptions.cs
- SpellerInterop.cs
- SqlSupersetValidator.cs
- ConvertEvent.cs
- FixedPage.cs
- ExpressionTextBoxAutomationPeer.cs
- ArrangedElementCollection.cs
- ListViewItem.cs
- DocobjHost.cs
- ExceptionTrace.cs
- TrackPoint.cs
- SqlCrossApplyToCrossJoin.cs
- WindowsTitleBar.cs
- SqlTransaction.cs
- ColumnMapCopier.cs
- PathFigureCollection.cs
- ThreadPoolTaskScheduler.cs
- FormsAuthenticationModule.cs
- CurrencyWrapper.cs
- ContextMarshalException.cs
- PrintDialogException.cs
- SpellerHighlightLayer.cs
- DbConnectionPoolIdentity.cs
- Overlapped.cs
- DataKeyCollection.cs
- CompositionAdorner.cs
- BindableTemplateBuilder.cs
- WindowsGraphics.cs
- DaylightTime.cs
- Queue.cs
- TimeStampChecker.cs
- DynamicUpdateCommand.cs
- WebBrowsableAttribute.cs
- ContextConfiguration.cs
- storepermissionattribute.cs
- PropertyDescriptors.cs
- IndicCharClassifier.cs
- ValidationRule.cs
- SelectingProviderEventArgs.cs
- ConfigurationStrings.cs
- LocalizationParserHooks.cs
- ToolStripSettings.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ListDictionaryInternal.cs
- RuntimeCompatibilityAttribute.cs
- DbProviderConfigurationHandler.cs
- SchemaElement.cs
- infer.cs
- DbSourceParameterCollection.cs
- GlyphInfoList.cs
- Evidence.cs
- XamlRtfConverter.cs
- CultureTableRecord.cs
- XmlSchemaNotation.cs
- IPEndPoint.cs
- CompiledAction.cs
- OLEDB_Enum.cs
- CodeSnippetExpression.cs
- ExpressionLexer.cs
- ServiceDescriptions.cs
- AuthenticationModuleElementCollection.cs
- ApplicationSettingsBase.cs
- PenThread.cs
- Converter.cs
- OleDbTransaction.cs
- LinearGradientBrush.cs