Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // //----------------------------------------------------------------------------- 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
- TreeNodeMouseHoverEvent.cs
- FlowNode.cs
- CustomError.cs
- BindingManagerDataErrorEventArgs.cs
- TextBlockAutomationPeer.cs
- HtmlTable.cs
- WebPartAddingEventArgs.cs
- LinearKeyFrames.cs
- HtmlInputImage.cs
- FixedSOMTable.cs
- PrintPreviewDialog.cs
- PowerStatus.cs
- SemanticTag.cs
- StateChangeEvent.cs
- PathFigureCollection.cs
- SqlReferenceCollection.cs
- OracleDateTime.cs
- MessageLogger.cs
- CompilationLock.cs
- ExpandCollapseProviderWrapper.cs
- HostDesigntimeLicenseContext.cs
- CommandExpr.cs
- DataRowCollection.cs
- TextParagraphProperties.cs
- CommandHelpers.cs
- ParallelQuery.cs
- Rectangle.cs
- TransformDescriptor.cs
- ExpandCollapsePattern.cs
- FixedDocument.cs
- TrustManager.cs
- InvalidCommandTreeException.cs
- XmlAnyElementAttribute.cs
- NativeMethods.cs
- _TimerThread.cs
- MembershipUser.cs
- ModelItemCollection.cs
- BindingCollection.cs
- ComboBoxItem.cs
- CheckBoxList.cs
- PagesSection.cs
- CheckBoxRenderer.cs
- XmlException.cs
- QilSortKey.cs
- Animatable.cs
- FlagsAttribute.cs
- PropertyStore.cs
- Line.cs
- DataRecordInternal.cs
- ProtectedConfigurationSection.cs
- cookiecollection.cs
- IxmlLineInfo.cs
- UnionExpr.cs
- StrokeCollection.cs
- DesignerEditorPartChrome.cs
- ButtonChrome.cs
- SqlConnectionString.cs
- SortedList.cs
- SmiContext.cs
- XhtmlBasicValidatorAdapter.cs
- FillRuleValidation.cs
- WinFormsSecurity.cs
- DoubleKeyFrameCollection.cs
- SQLInt32.cs
- ObjectStateEntry.cs
- RelatedPropertyManager.cs
- SoapRpcMethodAttribute.cs
- TCPClient.cs
- SkewTransform.cs
- BitmapEncoder.cs
- TextContainer.cs
- SqlRemoveConstantOrderBy.cs
- GetPageCompletedEventArgs.cs
- HttpPostProtocolReflector.cs
- SvcMapFileLoader.cs
- InvokeGenerator.cs
- ComMethodElementCollection.cs
- DataGridViewColumnHeaderCell.cs
- HealthMonitoringSectionHelper.cs
- XmlAutoDetectWriter.cs
- NameValueConfigurationCollection.cs
- KeyValuePairs.cs
- CryptographicAttribute.cs
- DataGridViewRow.cs
- exports.cs
- SmiRequestExecutor.cs
- CurrentChangingEventArgs.cs
- FormatConvertedBitmap.cs
- LoginDesignerUtil.cs
- PartEditor.cs
- ScrollBar.cs
- Operator.cs
- ProcessInputEventArgs.cs
- IntMinMaxAggregationOperator.cs
- LineBreakRecord.cs
- QueryStack.cs
- WebPageTraceListener.cs
- ResponseStream.cs
- ScrollableControl.cs
- WindowAutomationPeer.cs