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
- SQLSingle.cs
- ConversionValidationRule.cs
- FontTypeConverter.cs
- CatalogZoneBase.cs
- DrawingCollection.cs
- NewExpression.cs
- PeerNearMe.cs
- TypeInformation.cs
- DataKey.cs
- NestedContainer.cs
- DecimalStorage.cs
- String.cs
- SoapCodeExporter.cs
- LinkAreaEditor.cs
- CorrelationManager.cs
- LayoutUtils.cs
- XmlSchemaGroup.cs
- ByteAnimation.cs
- DES.cs
- XmlProcessingInstruction.cs
- DescendentsWalkerBase.cs
- SpeakProgressEventArgs.cs
- ContentElementCollection.cs
- PagesSection.cs
- QilIterator.cs
- CreateUserErrorEventArgs.cs
- EntityDataSourceContextDisposingEventArgs.cs
- MediaEntryAttribute.cs
- DispatcherHookEventArgs.cs
- ToolboxItemAttribute.cs
- DefinitionBase.cs
- CodeRemoveEventStatement.cs
- CodeDOMProvider.cs
- WebPartTransformerCollection.cs
- BitmapCodecInfoInternal.cs
- DrawingAttributeSerializer.cs
- GeometryGroup.cs
- XamlVector3DCollectionSerializer.cs
- TextFormatterContext.cs
- Substitution.cs
- HtmlControlPersistable.cs
- Transform.cs
- WebException.cs
- ProvidePropertyAttribute.cs
- XmlRawWriter.cs
- ExpandSegment.cs
- ModelTreeManager.cs
- LoginName.cs
- NamedPermissionSet.cs
- MethodCallTranslator.cs
- AttributeQuery.cs
- Rect3D.cs
- RegistrySecurity.cs
- RepeatBehaviorConverter.cs
- BufferedGraphicsManager.cs
- ConstraintCollection.cs
- Canonicalizers.cs
- Misc.cs
- XslAstAnalyzer.cs
- SolidBrush.cs
- _SafeNetHandles.cs
- Stack.cs
- StorageEntityTypeMapping.cs
- LinqTreeNodeEvaluator.cs
- SoapReflectionImporter.cs
- PresentationSource.cs
- PrintDialog.cs
- Timer.cs
- SymmetricAlgorithm.cs
- StreamMarshaler.cs
- odbcmetadatacolumnnames.cs
- ReadingWritingEntityEventArgs.cs
- DataControlFieldHeaderCell.cs
- CollectionContainer.cs
- Light.cs
- RoleManagerSection.cs
- VisualProxy.cs
- RegexTree.cs
- ExitEventArgs.cs
- DictionaryManager.cs
- PropertyMapper.cs
- CodeNamespaceCollection.cs
- MsmqIntegrationProcessProtocolHandler.cs
- DbBuffer.cs
- ShapingWorkspace.cs
- CrossAppDomainChannel.cs
- RightsManagementEncryptedStream.cs
- EventMetadata.cs
- CFStream.cs
- SchemaLookupTable.cs
- StreamWithDictionary.cs
- RSAOAEPKeyExchangeFormatter.cs
- PathFigure.cs
- WebPartConnectionsCancelEventArgs.cs
- SchemaTableColumn.cs
- HelpEvent.cs
- DesignConnectionCollection.cs
- TagMapCollection.cs
- SamlSecurityToken.cs
- ResourcePermissionBase.cs