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
- UInt64Storage.cs
- RootAction.cs
- BufferedWebEventProvider.cs
- DLinqDataModelProvider.cs
- DataBindingCollection.cs
- WebBrowserContainer.cs
- XmlReflectionImporter.cs
- ZipIOFileItemStream.cs
- NumberFormatInfo.cs
- Utils.cs
- MemberInfoSerializationHolder.cs
- TypeBuilderInstantiation.cs
- MasterPage.cs
- FormViewPagerRow.cs
- Container.cs
- PrintControllerWithStatusDialog.cs
- Deserializer.cs
- X509Certificate2.cs
- LinkLabelLinkClickedEvent.cs
- SettingsAttributeDictionary.cs
- ActivityExecutor.cs
- ResourceCategoryAttribute.cs
- KeyBinding.cs
- DirectionalLight.cs
- KeySpline.cs
- Listbox.cs
- BStrWrapper.cs
- Membership.cs
- precedingquery.cs
- PropertyGrid.cs
- RuntimeResourceSet.cs
- TrackingServices.cs
- EditorServiceContext.cs
- WebExceptionStatus.cs
- AppDomain.cs
- XmlSchemaObjectTable.cs
- IApplicationTrustManager.cs
- Quaternion.cs
- TypedElement.cs
- WorkflowWebService.cs
- ContainerTracking.cs
- DataObjectEventArgs.cs
- InvalidWMPVersionException.cs
- PrintingPermissionAttribute.cs
- MobileFormsAuthentication.cs
- HebrewCalendar.cs
- TextTreeUndoUnit.cs
- _OSSOCK.cs
- SHA1Managed.cs
- DataServiceQueryException.cs
- CodeMemberEvent.cs
- TableLayoutColumnStyleCollection.cs
- LinqDataSourceHelper.cs
- ButtonChrome.cs
- HtmlPanelAdapter.cs
- OneOfTypeConst.cs
- GroupQuery.cs
- NetworkInterface.cs
- ApplicationSettingsBase.cs
- MenuItemCollection.cs
- TypeSemantics.cs
- TransactionInterop.cs
- ProcessingInstructionAction.cs
- SoapRpcMethodAttribute.cs
- Margins.cs
- EditorZoneDesigner.cs
- BuildProviderAppliesToAttribute.cs
- RootDesignerSerializerAttribute.cs
- PaintValueEventArgs.cs
- DeferredReference.cs
- InstanceKeyCompleteException.cs
- ModulesEntry.cs
- StylusPlugin.cs
- PrintEvent.cs
- ProviderConnectionPointCollection.cs
- ProfessionalColors.cs
- BitmapFrameEncode.cs
- FrameworkElementAutomationPeer.cs
- HtmlToClrEventProxy.cs
- SystemNetworkInterface.cs
- COAUTHIDENTITY.cs
- WindowsGraphics.cs
- HtmlProps.cs
- StorageScalarPropertyMapping.cs
- odbcmetadatacollectionnames.cs
- TaskFormBase.cs
- FrameworkElementAutomationPeer.cs
- IImplicitResourceProvider.cs
- PropagatorResult.cs
- Win32SafeHandles.cs
- UseLicense.cs
- ImageListStreamer.cs
- RNGCryptoServiceProvider.cs
- DriveInfo.cs
- StrokeDescriptor.cs
- EnvelopedPkcs7.cs
- DesignerSerializationOptionsAttribute.cs
- ContainerParaClient.cs
- JsonFormatWriterGenerator.cs
- Stylesheet.cs