Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / FlowLayoutPanel.cs / 1305376 / 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
- GenericParameterDataContract.cs
- CodeNamespace.cs
- JsonDeserializer.cs
- OleDbInfoMessageEvent.cs
- WorkflowControlEndpoint.cs
- QuaternionRotation3D.cs
- GeneratedContractType.cs
- SqlDataSourceView.cs
- ConstantExpression.cs
- CommandValueSerializer.cs
- D3DImage.cs
- TemplateControlCodeDomTreeGenerator.cs
- ResourceSet.cs
- TextStore.cs
- ObjectManager.cs
- ObjectDisposedException.cs
- BeginStoryboard.cs
- MetaModel.cs
- GcSettings.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ApplicationSecurityManager.cs
- WebPartsPersonalizationAuthorization.cs
- Compress.cs
- ThemeDictionaryExtension.cs
- XmlQueryCardinality.cs
- MainMenu.cs
- NumberFormatter.cs
- WebSysDescriptionAttribute.cs
- path.cs
- Point3DCollectionConverter.cs
- SQLBinary.cs
- CommandBindingCollection.cs
- RelationshipDetailsCollection.cs
- ItemsControl.cs
- ValueSerializer.cs
- ActivityDesignerAccessibleObject.cs
- DesignerTransactionCloseEvent.cs
- InlineObject.cs
- Vector.cs
- InlinedAggregationOperator.cs
- XmlUTF8TextWriter.cs
- serverconfig.cs
- NonPrimarySelectionGlyph.cs
- DataGridHeaderBorder.cs
- EmptyControlCollection.cs
- PropertySourceInfo.cs
- DataServiceHostFactory.cs
- HtmlHistory.cs
- safePerfProviderHandle.cs
- Input.cs
- ProfileSection.cs
- AssertSection.cs
- MouseButton.cs
- CodeCommentStatement.cs
- GiveFeedbackEvent.cs
- URLIdentityPermission.cs
- HttpClientProtocol.cs
- GeneralTransformCollection.cs
- PrintingPermissionAttribute.cs
- SqlXml.cs
- ErrorWebPart.cs
- CngKey.cs
- WeakRefEnumerator.cs
- Rect3D.cs
- ConnectionPoolManager.cs
- WebServiceHost.cs
- CompilerHelpers.cs
- TemplateAction.cs
- GregorianCalendarHelper.cs
- Crc32.cs
- ImageUrlEditor.cs
- precedingquery.cs
- AtomServiceDocumentSerializer.cs
- XamlTreeBuilderBamlRecordWriter.cs
- mactripleDES.cs
- QilVisitor.cs
- ParameterModifier.cs
- SQLString.cs
- CommonDialog.cs
- HttpModuleActionCollection.cs
- CodeDelegateInvokeExpression.cs
- TextEffectCollection.cs
- EncryptedPackageFilter.cs
- TableRowCollection.cs
- MarkupExtensionParser.cs
- BrowserCapabilitiesFactoryBase.cs
- MatrixTransform.cs
- KerberosSecurityTokenParameters.cs
- StackOverflowException.cs
- ScriptRef.cs
- SslStream.cs
- DbTransaction.cs
- OleDbParameter.cs
- Dictionary.cs
- MethodExecutor.cs
- ProcessThreadDesigner.cs
- ExpanderAutomationPeer.cs
- CodeGen.cs
- XappLauncher.cs
- ProfileEventArgs.cs