Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- OdbcStatementHandle.cs
- HitTestParameters3D.cs
- MonitorWrapper.cs
- XmlTypeMapping.cs
- SelectionItemPattern.cs
- ClientTarget.cs
- CustomAttributeSerializer.cs
- ObjectContextServiceProvider.cs
- ContentType.cs
- TimeZone.cs
- ContentOperations.cs
- TreeIterator.cs
- PartialArray.cs
- EncodingInfo.cs
- WorkflowNamespace.cs
- ParameterCollection.cs
- SmiTypedGetterSetter.cs
- ZipFileInfoCollection.cs
- AxImporter.cs
- EntityContainer.cs
- BrushProxy.cs
- HtmlInputRadioButton.cs
- ImportContext.cs
- DynamicPropertyReader.cs
- Pts.cs
- SystemException.cs
- Expander.cs
- DataKey.cs
- StagingAreaInputItem.cs
- CachedResourceDictionaryExtension.cs
- IdentityManager.cs
- WmlControlAdapter.cs
- BitmapCodecInfo.cs
- ManagementObjectCollection.cs
- DataGridViewCellCancelEventArgs.cs
- CachedPathData.cs
- AncestorChangedEventArgs.cs
- ApplicationInterop.cs
- CollectionBase.cs
- ManifestResourceInfo.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- Byte.cs
- XhtmlConformanceSection.cs
- XmlNotation.cs
- TypeCodeDomSerializer.cs
- StorageMappingItemLoader.cs
- StyleSelector.cs
- ConfigurationErrorsException.cs
- PeerObject.cs
- PathSegment.cs
- UpdateRecord.cs
- NTAccount.cs
- CheckBox.cs
- PresentationSource.cs
- Match.cs
- PerformanceCounterCategory.cs
- CompareInfo.cs
- Bold.cs
- SecureStringHasher.cs
- HTMLTextWriter.cs
- DataGridClipboardCellContent.cs
- ModifierKeysConverter.cs
- BaseTemplateBuildProvider.cs
- XmlEncoding.cs
- Semaphore.cs
- WebExceptionStatus.cs
- Trace.cs
- SystemEvents.cs
- RichTextBoxConstants.cs
- Material.cs
- connectionpool.cs
- DateTimeConverter2.cs
- RSAProtectedConfigurationProvider.cs
- EntityProxyFactory.cs
- ProcessHostServerConfig.cs
- ApplicationCommands.cs
- DesignBinding.cs
- FunctionImportMapping.cs
- XmlSchemaAnnotated.cs
- XpsS0ValidatingLoader.cs
- Peer.cs
- CheckBoxDesigner.cs
- RoleManagerModule.cs
- Soap12ServerProtocol.cs
- PenCursorManager.cs
- WebPartConnectionsEventArgs.cs
- TableLayoutCellPaintEventArgs.cs
- Rotation3D.cs
- ProfilePropertySettings.cs
- ContextStaticAttribute.cs
- ToolStrip.cs
- TreeView.cs
- MaskedTextBox.cs
- SqlHelper.cs
- TTSEngineTypes.cs
- SQLResource.cs
- Function.cs
- MeasureItemEvent.cs
- DependencyPropertyHelper.cs
- TagNameToTypeMapper.cs