Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / TableLayoutStyle.cs / 1 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BitHelper.cs
- WebPartDisplayModeEventArgs.cs
- TableRow.cs
- ClientOptions.cs
- RuntimeIdentifierPropertyAttribute.cs
- ElementNotAvailableException.cs
- CacheDependency.cs
- HttpServerVarsCollection.cs
- EntityProviderServices.cs
- PropertyKey.cs
- MessageQueueCriteria.cs
- XmlDocumentType.cs
- TypeUtils.cs
- CharKeyFrameCollection.cs
- ProfessionalColors.cs
- Material.cs
- EntityDataSourceState.cs
- KeySplineConverter.cs
- DebugView.cs
- WebBrowserDesigner.cs
- EntityTypeEmitter.cs
- ObservableCollection.cs
- SmuggledIUnknown.cs
- AnnotationAdorner.cs
- PackageDigitalSignature.cs
- CalendarDay.cs
- AmbientLight.cs
- PointLightBase.cs
- AccessKeyManager.cs
- DataPointer.cs
- SystemWebExtensionsSectionGroup.cs
- QueryUtil.cs
- CodeMethodInvokeExpression.cs
- DbTypeMap.cs
- _LazyAsyncResult.cs
- GridPattern.cs
- TemplateBindingExtension.cs
- ConnectionProviderAttribute.cs
- Stream.cs
- ModelItemCollection.cs
- DesignRelation.cs
- ResourceDescriptionAttribute.cs
- Interop.cs
- Matrix.cs
- UpdateProgress.cs
- ContextProperty.cs
- EnumValAlphaComparer.cs
- EntitySetDataBindingList.cs
- HttpResponse.cs
- TextDecorationLocationValidation.cs
- ErasingStroke.cs
- FileNotFoundException.cs
- HandleRef.cs
- ManifestResourceInfo.cs
- ScrollItemPattern.cs
- nulltextnavigator.cs
- PassportAuthenticationEventArgs.cs
- QilExpression.cs
- FrameworkContextData.cs
- ServerTooBusyException.cs
- EntityCommandCompilationException.cs
- DirectionalLight.cs
- webclient.cs
- Buffer.cs
- PkcsMisc.cs
- ReturnValue.cs
- XslTransform.cs
- RawKeyboardInputReport.cs
- MethodToken.cs
- CodePageEncoding.cs
- ProjectionPlan.cs
- BCryptHashAlgorithm.cs
- DataGridViewMethods.cs
- Quad.cs
- SafeArchiveContext.cs
- BypassElement.cs
- Cursor.cs
- TraceData.cs
- GenericTypeParameterConverter.cs
- NameNode.cs
- PerformanceCounters.cs
- DiffuseMaterial.cs
- SafeNativeMethods.cs
- DmlSqlGenerator.cs
- TabControlDesigner.cs
- StringBlob.cs
- RewritingPass.cs
- AbstractSvcMapFileLoader.cs
- SourceInterpreter.cs
- ILGenerator.cs
- HTTPNotFoundHandler.cs
- HMACSHA256.cs
- XPathNode.cs
- WinFormsSecurity.cs
- HwndSource.cs
- TreeNode.cs
- StrokeCollection.cs
- RunClient.cs
- EmptyImpersonationContext.cs
- ActivityExecutionFilter.cs