Code:
/ FX-1434 / FX-1434 / 1.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
- ReliableMessagingVersionConverter.cs
- base64Transforms.cs
- Storyboard.cs
- Decorator.cs
- Serialization.cs
- MessageQueueCriteria.cs
- LabelDesigner.cs
- Math.cs
- WorkflowRuntime.cs
- StatusBar.cs
- BadImageFormatException.cs
- GroupItemAutomationPeer.cs
- PrivilegeNotHeldException.cs
- ServicesUtilities.cs
- documentsequencetextpointer.cs
- safelinkcollection.cs
- SubMenuStyleCollection.cs
- XmlSchemaValidator.cs
- FixedHyperLink.cs
- Setter.cs
- AlphaSortedEnumConverter.cs
- OrderedEnumerableRowCollection.cs
- FileSystemEnumerable.cs
- EntityDataSourceValidationException.cs
- XamlTypeMapper.cs
- CardSpacePolicyElement.cs
- NextPreviousPagerField.cs
- InstanceStore.cs
- ExtensionQuery.cs
- NavigationProperty.cs
- NotifyParentPropertyAttribute.cs
- PolyLineSegment.cs
- StrokeNode.cs
- DataGridViewIntLinkedList.cs
- PerformanceCounterPermissionEntry.cs
- mediaeventargs.cs
- MouseCaptureWithinProperty.cs
- HttpValueCollection.cs
- ReadingWritingEntityEventArgs.cs
- XslNumber.cs
- WindowInteropHelper.cs
- SymbolPair.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- DataColumnMapping.cs
- SByteConverter.cs
- DependencyPropertyKind.cs
- KeySpline.cs
- DeclaredTypeElementCollection.cs
- FramingChannels.cs
- PanelDesigner.cs
- EntitySetDataBindingList.cs
- CatalogZone.cs
- CategoryGridEntry.cs
- ActivationArguments.cs
- AttributeQuery.cs
- ViewGenResults.cs
- PopOutPanel.cs
- DesignerLoader.cs
- Brush.cs
- X509CertificateInitiatorClientCredential.cs
- DataGridViewColumn.cs
- SqlMultiplexer.cs
- DataTransferEventArgs.cs
- ControlCodeDomSerializer.cs
- FileDialogCustomPlace.cs
- DesignTimeTemplateParser.cs
- UpdatePanelControlTrigger.cs
- ByteFacetDescriptionElement.cs
- UnsignedPublishLicense.cs
- AsyncCompletedEventArgs.cs
- SspiNegotiationTokenProviderState.cs
- LiteralControl.cs
- CodeComment.cs
- TextAutomationPeer.cs
- DataBoundLiteralControl.cs
- SerializableReadOnlyDictionary.cs
- wgx_commands.cs
- StaticFileHandler.cs
- PageRouteHandler.cs
- AvtEvent.cs
- Rotation3DKeyFrameCollection.cs
- RegexFCD.cs
- WorkflowInstanceExtensionCollection.cs
- RectAnimationBase.cs
- CultureInfoConverter.cs
- SapiRecoInterop.cs
- XmlSerializerAssemblyAttribute.cs
- IODescriptionAttribute.cs
- FormsIdentity.cs
- ScrollContentPresenter.cs
- TableProvider.cs
- SizeAnimation.cs
- PerfCounters.cs
- CodeDomConfigurationHandler.cs
- DynamicDataManager.cs
- WindowsGraphics2.cs
- RelatedImageListAttribute.cs
- AffineTransform3D.cs
- RTLAwareMessageBox.cs
- GridViewSelectEventArgs.cs