Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- TextParaClient.cs
- XmlAnyAttributeAttribute.cs
- WebPartConnectionsDisconnectVerb.cs
- DisableDpiAwarenessAttribute.cs
- TransformCryptoHandle.cs
- COM2ICategorizePropertiesHandler.cs
- WorkflowTransactionOptions.cs
- XPathParser.cs
- GiveFeedbackEvent.cs
- Selection.cs
- CompilationLock.cs
- AtlasWeb.Designer.cs
- PageThemeParser.cs
- IfJoinedCondition.cs
- TdsParserSessionPool.cs
- QueryCreatedEventArgs.cs
- XmlElement.cs
- SeparatorAutomationPeer.cs
- ValidationSummary.cs
- RegexStringValidator.cs
- SqlReorderer.cs
- GridView.cs
- ContainerParaClient.cs
- ErrorEventArgs.cs
- TrackingAnnotationCollection.cs
- PeerCollaborationPermission.cs
- CommonXSendMessage.cs
- control.ime.cs
- HtmlElementCollection.cs
- TextBlock.cs
- FactoryGenerator.cs
- CriticalFinalizerObject.cs
- XPathAncestorQuery.cs
- RewritingValidator.cs
- StringToken.cs
- Quaternion.cs
- ActivityIdHeader.cs
- FormViewUpdateEventArgs.cs
- WebBrowserUriTypeConverter.cs
- CodeAttachEventStatement.cs
- StylusShape.cs
- ObjectDisposedException.cs
- ToolboxDataAttribute.cs
- SoapHttpTransportImporter.cs
- RangeValidator.cs
- CodeDefaultValueExpression.cs
- TextReader.cs
- TextRangeBase.cs
- SelfSignedCertificate.cs
- TransactionManager.cs
- ContractHandle.cs
- PropertyTabChangedEvent.cs
- DataListGeneralPage.cs
- OutputCacheSection.cs
- EventSetter.cs
- EditorZone.cs
- ToolStripSystemRenderer.cs
- StorageModelBuildProvider.cs
- StyleSheetRefUrlEditor.cs
- ResizeGrip.cs
- SQLInt16.cs
- MemoryMappedFileSecurity.cs
- ActiveXSite.cs
- UnsettableComboBox.cs
- CreateUserErrorEventArgs.cs
- DataColumnPropertyDescriptor.cs
- AssociationSet.cs
- HttpPostedFile.cs
- DecoderBestFitFallback.cs
- ResourceWriter.cs
- ResXResourceSet.cs
- DataBinding.cs
- PathSegment.cs
- LateBoundBitmapDecoder.cs
- messageonlyhwndwrapper.cs
- Page.cs
- ToolStripSplitStackLayout.cs
- ValidationHelper.cs
- ObjRef.cs
- SelectionProviderWrapper.cs
- InternalCache.cs
- DocumentViewerConstants.cs
- XmlUtil.cs
- UpdateCommand.cs
- TextBoxDesigner.cs
- WebPartDisplayMode.cs
- RestClientProxyHandler.cs
- HttpCacheVary.cs
- CharacterShapingProperties.cs
- BinaryUtilClasses.cs
- CorrelationTokenInvalidatedHandler.cs
- AuthStoreRoleProvider.cs
- RectAnimationBase.cs
- Style.cs
- Rect.cs
- LiteralControl.cs
- Calendar.cs
- PropertyCollection.cs
- DataBindingCollectionEditor.cs
- XmlSchemaSimpleContent.cs