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
- AnnouncementService.cs
- VectorAnimationBase.cs
- GetReadStreamResult.cs
- ThreadExceptionEvent.cs
- MarkupCompilePass1.cs
- TypeUtil.cs
- TextMessageEncoder.cs
- KoreanCalendar.cs
- TextRangeSerialization.cs
- XhtmlBasicPageAdapter.cs
- sortedlist.cs
- PropertyFilterAttribute.cs
- SourceLocation.cs
- Highlights.cs
- CapabilitiesUse.cs
- GroupItem.cs
- ChameleonKey.cs
- HScrollBar.cs
- InterleavedZipPartStream.cs
- XmlSubtreeReader.cs
- InspectionWorker.cs
- IndexedString.cs
- DataControlPagerLinkButton.cs
- XPathExpr.cs
- PictureBox.cs
- Stacktrace.cs
- EncodingFallbackAwareXmlTextWriter.cs
- WebReference.cs
- Deflater.cs
- ScriptIgnoreAttribute.cs
- TextEditorTyping.cs
- _ConnectionGroup.cs
- SliderAutomationPeer.cs
- ViewStateModeByIdAttribute.cs
- XmlLangPropertyAttribute.cs
- ListDictionaryInternal.cs
- DetailsViewCommandEventArgs.cs
- FixedMaxHeap.cs
- ShapingWorkspace.cs
- Int16Storage.cs
- ServiceRouteHandler.cs
- PageContentAsyncResult.cs
- TrackBarRenderer.cs
- DesignerCategoryAttribute.cs
- AdjustableArrowCap.cs
- MetadataUtil.cs
- ContextMenu.cs
- HotSpot.cs
- DetailsViewDeleteEventArgs.cs
- ZipFileInfoCollection.cs
- PrePostDescendentsWalker.cs
- BufferedStream.cs
- ReferentialConstraintRoleElement.cs
- ValidationSummary.cs
- ImageBrush.cs
- Clipboard.cs
- ScriptingWebServicesSectionGroup.cs
- ListDataHelper.cs
- XmlMembersMapping.cs
- CustomTrackingRecord.cs
- AppSettingsSection.cs
- GeneralTransform2DTo3DTo2D.cs
- PrefixQName.cs
- control.ime.cs
- ObservableDictionary.cs
- WorkBatch.cs
- EditingScopeUndoUnit.cs
- DiscoveryClientDuplexChannel.cs
- SemaphoreFullException.cs
- mda.cs
- ToolStripHighContrastRenderer.cs
- FloaterParagraph.cs
- NativeMethods.cs
- RegexCharClass.cs
- OdbcUtils.cs
- NamespaceMapping.cs
- ComPlusThreadInitializer.cs
- EntityViewGenerationAttribute.cs
- DynamicILGenerator.cs
- DESCryptoServiceProvider.cs
- DefaultSection.cs
- CombinedGeometry.cs
- TypedDatasetGenerator.cs
- Int64Animation.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- ExtractorMetadata.cs
- WebPartCancelEventArgs.cs
- BamlBinaryReader.cs
- HtmlInputFile.cs
- Pair.cs
- PictureBox.cs
- XmlWriterTraceListener.cs
- KeyTime.cs
- ExpressionPrefixAttribute.cs
- ProfileEventArgs.cs
- ProfilePropertyNameValidator.cs
- IconEditor.cs
- EventLogPermission.cs
- ToolStripItemDesigner.cs
- ScriptReferenceEventArgs.cs