Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / TableLayoutStyle.cs / 1305376 / TableLayoutStyle.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Windows.Forms {
using System;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Design;
using System.Globalization;
using System.Windows.Forms.Layout;
using System.Reflection;
///
[TypeConverterAttribute(typeof(TableLayoutSettings.StyleConverter))]
public abstract class TableLayoutStyle {
private IArrangedElement _owner;
private SizeType _sizeType = SizeType.AutoSize;
private float _size;
///
[DefaultValue(SizeType.AutoSize)]
public SizeType SizeType {
get { return _sizeType; }
set {
if (_sizeType != value) {
_sizeType = value;
if(Owner != null) {
LayoutTransaction.DoLayout(Owner, Owner, PropertyNames.Style);
Control owner = Owner as Control;
if (owner != null) {
owner.Invalidate();
}
}
}
}
}
internal float Size {
get { return _size; }
set {
if (value < 0) {
throw new ArgumentOutOfRangeException("Size", SR.GetString(SR.InvalidLowBoundArgumentEx, "Size", value.ToString(CultureInfo.CurrentCulture), (0).ToString(CultureInfo.CurrentCulture)));
}
if (_size != value) {
_size = value;
if(Owner != null) {
LayoutTransaction.DoLayout(Owner, Owner, PropertyNames.Style);
Control owner = Owner as Control;
if (owner != null) {
owner.Invalidate();
}
}
}
}
}
private bool ShouldSerializeSize() {
return SizeType != SizeType.AutoSize;
}
internal IArrangedElement Owner {
get { return _owner; }
set { _owner = value; }
}
//set the size without doing a layout
internal void SetSize(float size) {
Debug.Assert(size >= 0);
_size = size;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Windows.Forms {
using System;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Design;
using System.Globalization;
using System.Windows.Forms.Layout;
using System.Reflection;
///
[TypeConverterAttribute(typeof(TableLayoutSettings.StyleConverter))]
public abstract class TableLayoutStyle {
private IArrangedElement _owner;
private SizeType _sizeType = SizeType.AutoSize;
private float _size;
///
[DefaultValue(SizeType.AutoSize)]
public SizeType SizeType {
get { return _sizeType; }
set {
if (_sizeType != value) {
_sizeType = value;
if(Owner != null) {
LayoutTransaction.DoLayout(Owner, Owner, PropertyNames.Style);
Control owner = Owner as Control;
if (owner != null) {
owner.Invalidate();
}
}
}
}
}
internal float Size {
get { return _size; }
set {
if (value < 0) {
throw new ArgumentOutOfRangeException("Size", SR.GetString(SR.InvalidLowBoundArgumentEx, "Size", value.ToString(CultureInfo.CurrentCulture), (0).ToString(CultureInfo.CurrentCulture)));
}
if (_size != value) {
_size = value;
if(Owner != null) {
LayoutTransaction.DoLayout(Owner, Owner, PropertyNames.Style);
Control owner = Owner as Control;
if (owner != null) {
owner.Invalidate();
}
}
}
}
}
private bool ShouldSerializeSize() {
return SizeType != SizeType.AutoSize;
}
internal IArrangedElement Owner {
get { return _owner; }
set { _owner = value; }
}
//set the size without doing a layout
internal void SetSize(float size) {
Debug.Assert(size >= 0);
_size = size;
}
}
}
// 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
- InvalidOleVariantTypeException.cs
- XmlSchemaElement.cs
- SqlUdtInfo.cs
- ParenthesizePropertyNameAttribute.cs
- MulticastOption.cs
- InputScope.cs
- TemplatedMailWebEventProvider.cs
- SoapFault.cs
- AnimationStorage.cs
- MimeXmlImporter.cs
- ItemChangedEventArgs.cs
- _Semaphore.cs
- CalendarDesigner.cs
- PipeStream.cs
- TabletCollection.cs
- WindowsRichEditRange.cs
- ExpressionLink.cs
- MessageAction.cs
- EncoderParameter.cs
- InstalledFontCollection.cs
- METAHEADER.cs
- TableDetailsRow.cs
- XhtmlBasicCalendarAdapter.cs
- RoleGroup.cs
- ServiceModelConfigurationSectionCollection.cs
- X509ChainElement.cs
- BitmapScalingModeValidation.cs
- ClientOptions.cs
- WeakRefEnumerator.cs
- ActivityBindForm.cs
- Pair.cs
- DbConnectionPoolGroupProviderInfo.cs
- EntityCommand.cs
- ConcatQueryOperator.cs
- SamlNameIdentifierClaimResource.cs
- NameSpaceEvent.cs
- Transform.cs
- SymLanguageType.cs
- XmlAutoDetectWriter.cs
- PassportAuthentication.cs
- EncoderFallback.cs
- Ref.cs
- RouteItem.cs
- XmlSchemaAttributeGroupRef.cs
- OdbcParameterCollection.cs
- DiscardableAttribute.cs
- DynamicHyperLink.cs
- Attributes.cs
- ListView.cs
- VisualProxy.cs
- SecurityRuntime.cs
- GridViewAutomationPeer.cs
- SourceLineInfo.cs
- ResponseStream.cs
- DocumentOrderQuery.cs
- SmtpException.cs
- PoisonMessageException.cs
- QueueProcessor.cs
- BroadcastEventHelper.cs
- Stopwatch.cs
- RichTextBox.cs
- CellConstantDomain.cs
- PointF.cs
- SourceChangedEventArgs.cs
- LinqExpressionNormalizer.cs
- DataGridViewCellCancelEventArgs.cs
- IdnElement.cs
- SqlDataSourceCache.cs
- RegistryPermission.cs
- BroadcastEventHelper.cs
- SoapInteropTypes.cs
- OdbcConnection.cs
- ClientEventManager.cs
- SqlClientFactory.cs
- EntityContainer.cs
- QualifiedCellIdBoolean.cs
- HttpDictionary.cs
- LogicalMethodInfo.cs
- TextServicesLoader.cs
- Command.cs
- FontFamily.cs
- Configuration.cs
- FixedPageAutomationPeer.cs
- ErrorStyle.cs
- CalendarDataBindingHandler.cs
- MemberInfoSerializationHolder.cs
- SystemIcons.cs
- LogicalExpr.cs
- KnowledgeBase.cs
- ListViewTableRow.cs
- DbMetaDataCollectionNames.cs
- XslCompiledTransform.cs
- NativeCppClassAttribute.cs
- BitSet.cs
- TimeoutException.cs
- HScrollBar.cs
- DataGridHyperlinkColumn.cs
- PageVisual.cs
- PerformanceCounter.cs
- Comparer.cs