Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / WinForms / Managed / System / WinForms / FlowLayoutPanel.cs / 1 / FlowLayoutPanel.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Windows.Forms.Layout; using System.Runtime.InteropServices; ///[ComVisible(true)] [ClassInterface(ClassInterfaceType.AutoDispatch)] [ProvideProperty("FlowBreak", typeof(Control))] [DefaultProperty("FlowDirection")] [Designer("System.Windows.Forms.Design.FlowLayoutPanelDesigner, " + AssemblyRef.SystemDesign)] [Docking(DockingBehavior.Ask)] [SRDescription(SR.DescriptionFlowLayoutPanel)] public class FlowLayoutPanel : Panel, IExtenderProvider { private FlowLayoutSettings _flowLayoutSettings; /// public FlowLayoutPanel() { _flowLayoutSettings = FlowLayout.CreateSettings(this); } /// public override LayoutEngine LayoutEngine { get { return FlowLayout.Instance; } } /// [SRDescription(SR.FlowPanelFlowDirectionDescr)] [DefaultValue(FlowDirection.LeftToRight)] [SRCategory(SR.CatLayout)] [Localizable(true)] public FlowDirection FlowDirection { get { return _flowLayoutSettings.FlowDirection; } set { _flowLayoutSettings.FlowDirection = value; Debug.Assert(FlowDirection == value, "FlowDirection should be the same as we set it"); } } /// [SRDescription(SR.FlowPanelWrapContentsDescr)] [DefaultValue(true)] [SRCategory(SR.CatLayout)] [Localizable(true)] public bool WrapContents { get { return _flowLayoutSettings.WrapContents; } set { _flowLayoutSettings.WrapContents = value; Debug.Assert(WrapContents == value, "WrapContents should be the same as we set it"); } } #region Provided properties /// /// bool IExtenderProvider.CanExtend(object obj) { Control control = obj as Control; return control != null && control.Parent == this; } [DefaultValue(false)] [DisplayName("FlowBreak")] public bool GetFlowBreak(Control control) { return _flowLayoutSettings.GetFlowBreak(control); } [DisplayName("FlowBreak")] public void SetFlowBreak(Control control, bool value) { _flowLayoutSettings.SetFlowBreak(control, value); } #endregion } } // 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.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Windows.Forms.Layout; using System.Runtime.InteropServices; ///[ComVisible(true)] [ClassInterface(ClassInterfaceType.AutoDispatch)] [ProvideProperty("FlowBreak", typeof(Control))] [DefaultProperty("FlowDirection")] [Designer("System.Windows.Forms.Design.FlowLayoutPanelDesigner, " + AssemblyRef.SystemDesign)] [Docking(DockingBehavior.Ask)] [SRDescription(SR.DescriptionFlowLayoutPanel)] public class FlowLayoutPanel : Panel, IExtenderProvider { private FlowLayoutSettings _flowLayoutSettings; /// public FlowLayoutPanel() { _flowLayoutSettings = FlowLayout.CreateSettings(this); } /// public override LayoutEngine LayoutEngine { get { return FlowLayout.Instance; } } /// [SRDescription(SR.FlowPanelFlowDirectionDescr)] [DefaultValue(FlowDirection.LeftToRight)] [SRCategory(SR.CatLayout)] [Localizable(true)] public FlowDirection FlowDirection { get { return _flowLayoutSettings.FlowDirection; } set { _flowLayoutSettings.FlowDirection = value; Debug.Assert(FlowDirection == value, "FlowDirection should be the same as we set it"); } } /// [SRDescription(SR.FlowPanelWrapContentsDescr)] [DefaultValue(true)] [SRCategory(SR.CatLayout)] [Localizable(true)] public bool WrapContents { get { return _flowLayoutSettings.WrapContents; } set { _flowLayoutSettings.WrapContents = value; Debug.Assert(WrapContents == value, "WrapContents should be the same as we set it"); } } #region Provided properties /// /// bool IExtenderProvider.CanExtend(object obj) { Control control = obj as Control; return control != null && control.Parent == this; } [DefaultValue(false)] [DisplayName("FlowBreak")] public bool GetFlowBreak(Control control) { return _flowLayoutSettings.GetFlowBreak(control); } [DisplayName("FlowBreak")] public void SetFlowBreak(Control control, bool value) { _flowLayoutSettings.SetFlowBreak(control, value); } #endregion } } // 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
- PreviewKeyDownEventArgs.cs
- DesignerValidatorAdapter.cs
- _IPv6Address.cs
- invalidudtexception.cs
- RowVisual.cs
- AliasedSlot.cs
- CommonProperties.cs
- StoreItemCollection.Loader.cs
- AppDomainFactory.cs
- Int32Rect.cs
- ProfileProvider.cs
- XMLSchema.cs
- pingexception.cs
- CollectionConverter.cs
- FieldToken.cs
- CornerRadiusConverter.cs
- AuthenticateEventArgs.cs
- PasswordTextContainer.cs
- SubstitutionList.cs
- Win32.cs
- DataGridViewRowEventArgs.cs
- GetChildSubtree.cs
- SamlAuthorizationDecisionStatement.cs
- ScriptServiceAttribute.cs
- JoinCqlBlock.cs
- ExpressionParser.cs
- Token.cs
- ViewGenerator.cs
- RedirectionProxy.cs
- ContentIterators.cs
- RequiredArgumentAttribute.cs
- Rights.cs
- SerializationEventsCache.cs
- DataGridViewColumnCollection.cs
- SessionEndedEventArgs.cs
- ControlDesigner.cs
- XamlSerializationHelper.cs
- SimpleType.cs
- TableLayoutPanelDesigner.cs
- KeyValuePairs.cs
- XmlCompatibilityReader.cs
- PagePropertiesChangingEventArgs.cs
- QilCloneVisitor.cs
- ProjectionCamera.cs
- TimerTable.cs
- PenContexts.cs
- AttachedAnnotation.cs
- HttpCapabilitiesBase.cs
- BezierSegment.cs
- SparseMemoryStream.cs
- Transaction.cs
- ObjectQueryProvider.cs
- Vector.cs
- XmlSchemaComplexContentRestriction.cs
- ListViewEditEventArgs.cs
- GACIdentityPermission.cs
- ChangeDirector.cs
- TdsParser.cs
- DataGridLinkButton.cs
- XPathDocumentIterator.cs
- CatalogPart.cs
- IncrementalHitTester.cs
- ModelChangedEventArgsImpl.cs
- TextBoxBase.cs
- XmlQueryType.cs
- RemoteWebConfigurationHostStream.cs
- WsdlImporterElement.cs
- StrokeNodeOperations.cs
- XmlParserContext.cs
- CommentEmitter.cs
- BasePattern.cs
- PathParser.cs
- CodeCommentStatementCollection.cs
- TcpHostedTransportConfiguration.cs
- DateTimeParse.cs
- XmlSchemaRedefine.cs
- DPCustomTypeDescriptor.cs
- Logging.cs
- _ConnectionGroup.cs
- FormViewPageEventArgs.cs
- AddingNewEventArgs.cs
- FixedStringLookup.cs
- PropertyGridEditorPart.cs
- GenericRootAutomationPeer.cs
- JsonWriter.cs
- FontConverter.cs
- AffineTransform3D.cs
- _SingleItemRequestCache.cs
- ItemList.cs
- Sql8ConformanceChecker.cs
- XmlArrayItemAttributes.cs
- FontCacheLogic.cs
- InProcStateClientManager.cs
- SupportsEventValidationAttribute.cs
- InfocardExtendedInformationEntry.cs
- ObjectDataSourceEventArgs.cs
- BackgroundFormatInfo.cs
- X509ImageLogo.cs
- JsonFormatWriterGenerator.cs
- DataGridViewCellCancelEventArgs.cs