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
- WebFaultClientMessageInspector.cs
- CachedCompositeFamily.cs
- TriggerBase.cs
- IdentityModelStringsVersion1.cs
- TextBoxLine.cs
- PropertyKey.cs
- DynamicResourceExtension.cs
- XmlSchemaValidator.cs
- Message.cs
- ValueTypeFixupInfo.cs
- ConditionCollection.cs
- HtmlEncodedRawTextWriter.cs
- xml.cs
- RecordConverter.cs
- IRCollection.cs
- AttachedPropertyInfo.cs
- ActivationArguments.cs
- MemoryPressure.cs
- AssemblyAttributesGoHere.cs
- TypeElement.cs
- MSAAEventDispatcher.cs
- JapaneseLunisolarCalendar.cs
- ListViewGroupConverter.cs
- TextParagraphProperties.cs
- CancellationTokenRegistration.cs
- SqlAggregateChecker.cs
- DefaultObjectMappingItemCollection.cs
- StrongNameUtility.cs
- IndexedEnumerable.cs
- AuthenticatedStream.cs
- HttpContextServiceHost.cs
- NativeMethods.cs
- SocketException.cs
- SoapInteropTypes.cs
- Win32Exception.cs
- CodeTypeConstructor.cs
- CdpEqualityComparer.cs
- HandledEventArgs.cs
- Point4D.cs
- SchemaElementDecl.cs
- RC2.cs
- ProfileGroupSettingsCollection.cs
- HostingEnvironmentWrapper.cs
- FontFamily.cs
- HelpKeywordAttribute.cs
- DynamicRenderer.cs
- VerificationAttribute.cs
- CoTaskMemHandle.cs
- SHA256.cs
- FacetChecker.cs
- DesignerDataTable.cs
- BitmapImage.cs
- UnsafeNativeMethods.cs
- HtmlInputPassword.cs
- Int32Rect.cs
- HostingEnvironmentSection.cs
- DependencyPropertyConverter.cs
- controlskin.cs
- ToolStripHighContrastRenderer.cs
- XmlCharacterData.cs
- EncryptedType.cs
- TypeDelegator.cs
- CompilationRelaxations.cs
- CollectionBuilder.cs
- WindowsGraphics2.cs
- XamlVector3DCollectionSerializer.cs
- ClientCultureInfo.cs
- GiveFeedbackEvent.cs
- Composition.cs
- ValidationUtility.cs
- DbConnectionOptions.cs
- XsltQilFactory.cs
- SqlUnionizer.cs
- ColumnMapTranslator.cs
- OverrideMode.cs
- Brush.cs
- JournalEntry.cs
- SecurityKeyEntropyMode.cs
- WrappedIUnknown.cs
- VectorValueSerializer.cs
- TaiwanCalendar.cs
- PrintPreviewDialog.cs
- HelpFileFileNameEditor.cs
- StringKeyFrameCollection.cs
- Resources.Designer.cs
- Package.cs
- XmlDesignerDataSourceView.cs
- LinkUtilities.cs
- DictionarySectionHandler.cs
- SmtpAuthenticationManager.cs
- TdsParserStaticMethods.cs
- CheckBoxFlatAdapter.cs
- TreeNodeConverter.cs
- TextSchema.cs
- RenderContext.cs
- DynamicUpdateCommand.cs
- FixedTextContainer.cs
- ScaleTransform.cs
- DateTimeValueSerializerContext.cs
- Set.cs