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
- SqlInfoMessageEvent.cs
- OpenTypeLayoutCache.cs
- QueryCacheKey.cs
- RemotingSurrogateSelector.cs
- GridPatternIdentifiers.cs
- DataBinder.cs
- ZipQueryOperator.cs
- ContainerControl.cs
- datacache.cs
- PersonalizationDictionary.cs
- DocumentPage.cs
- HighlightComponent.cs
- SweepDirectionValidation.cs
- MenuRendererClassic.cs
- HtmlTableCellCollection.cs
- RangeValueProviderWrapper.cs
- MembershipValidatePasswordEventArgs.cs
- CreateInstanceBinder.cs
- TypeForwardedToAttribute.cs
- QilIterator.cs
- LookupNode.cs
- TextBoxView.cs
- NameTable.cs
- ValueTypePropertyReference.cs
- StringResourceManager.cs
- MultitargetUtil.cs
- SingleSelectRootGridEntry.cs
- WindowsAltTab.cs
- PagerStyle.cs
- WindowPattern.cs
- FigureParagraph.cs
- ScrollableControlDesigner.cs
- MatrixAnimationBase.cs
- PreviewPageInfo.cs
- SerializationBinder.cs
- Rule.cs
- recordstate.cs
- ArraySubsetEnumerator.cs
- CustomTrackingRecord.cs
- DbParameterHelper.cs
- Viewport2DVisual3D.cs
- DataControlPagerLinkButton.cs
- ProtocolsConfigurationEntry.cs
- OrderedDictionary.cs
- SqlNotificationRequest.cs
- MethodExpr.cs
- ViewKeyConstraint.cs
- KeyNotFoundException.cs
- DetailsViewCommandEventArgs.cs
- CodeSnippetCompileUnit.cs
- SqlConnectionManager.cs
- ObjectViewEntityCollectionData.cs
- FormatException.cs
- Int32CollectionConverter.cs
- RuntimeArgumentHandle.cs
- KeySplineConverter.cs
- Completion.cs
- UTF32Encoding.cs
- DataObjectMethodAttribute.cs
- DeploymentSectionCache.cs
- AppDomainFactory.cs
- StringExpressionSet.cs
- DynamicControlParameter.cs
- CategoryNameCollection.cs
- TextEditor.cs
- Model3D.cs
- IPCCacheManager.cs
- sapiproxy.cs
- TypeUsage.cs
- InvalidFilterCriteriaException.cs
- TypeConverterHelper.cs
- PingOptions.cs
- DesignerHelpers.cs
- CreatingCookieEventArgs.cs
- AspNetSynchronizationContext.cs
- CompoundFileIOPermission.cs
- SystemColors.cs
- SystemWebSectionGroup.cs
- ImageProxy.cs
- _ListenerResponseStream.cs
- OdbcTransaction.cs
- XmlDataImplementation.cs
- RemotingSurrogateSelector.cs
- SystemTcpStatistics.cs
- HostUtils.cs
- NamespaceEmitter.cs
- TextClipboardData.cs
- WebPartCatalogCloseVerb.cs
- ReflectionUtil.cs
- WhiteSpaceTrimStringConverter.cs
- SettingsPropertyValueCollection.cs
- CompilationLock.cs
- DataGridViewAccessibleObject.cs
- PrePrepareMethodAttribute.cs
- PinnedBufferMemoryStream.cs
- WebResourceUtil.cs
- FileDialog.cs
- CodeSnippetExpression.cs
- SqlConnectionPoolProviderInfo.cs
- WorkflowLayouts.cs