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
- ValueTypeFixupInfo.cs
- SparseMemoryStream.cs
- ResumeStoryboard.cs
- EnumBuilder.cs
- StatusBar.cs
- EraserBehavior.cs
- SyndicationElementExtension.cs
- MappingMetadataHelper.cs
- LineProperties.cs
- LingerOption.cs
- ConfigurationException.cs
- ImportCatalogPart.cs
- Queue.cs
- StatusBar.cs
- messageonlyhwndwrapper.cs
- DrawingAttributeSerializer.cs
- Matrix3DValueSerializer.cs
- XsdBuilder.cs
- CharEnumerator.cs
- XmlHelper.cs
- ReadOnlyObservableCollection.cs
- SafeBitVector32.cs
- URL.cs
- URLEditor.cs
- LocalizationParserHooks.cs
- Main.cs
- Icon.cs
- ConfigurationManagerHelper.cs
- ConfigurationValues.cs
- WriteableBitmap.cs
- ReadOnlyTernaryTree.cs
- ToolTipService.cs
- TextRange.cs
- IgnoreFileBuildProvider.cs
- SqlCaseSimplifier.cs
- DecimalAnimation.cs
- PersonalizationState.cs
- DuplicateDetector.cs
- ColorKeyFrameCollection.cs
- DataFormats.cs
- HasRunnableWorkflowEvent.cs
- NamespaceInfo.cs
- CollectionChangeEventArgs.cs
- ComAdminWrapper.cs
- TreeNodeClickEventArgs.cs
- DataGridViewTextBoxEditingControl.cs
- ReferenceEqualityComparer.cs
- Int64KeyFrameCollection.cs
- PointCollection.cs
- GeometryModel3D.cs
- Pen.cs
- RunInstallerAttribute.cs
- HyperLinkColumn.cs
- PictureBox.cs
- RadioButtonRenderer.cs
- OverflowException.cs
- Tuple.cs
- ComboBox.cs
- iisPickupDirectory.cs
- ZoneButton.cs
- MutableAssemblyCacheEntry.cs
- oledbconnectionstring.cs
- ProxyManager.cs
- CustomPopupPlacement.cs
- SimpleApplicationHost.cs
- Label.cs
- ConditionedDesigner.cs
- SHA384Managed.cs
- DashStyle.cs
- AccessControlEntry.cs
- MethodSet.cs
- FormsAuthenticationUserCollection.cs
- WebServiceEnumData.cs
- _CommandStream.cs
- DataGridViewRow.cs
- TextEditorParagraphs.cs
- Exception.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- XsdDateTime.cs
- MultiDataTrigger.cs
- SoapCodeExporter.cs
- ContainerParagraph.cs
- MethodAccessException.cs
- Win32Interop.cs
- AbstractDataSvcMapFileLoader.cs
- LayoutEngine.cs
- MinimizableAttributeTypeConverter.cs
- TypedOperationInfo.cs
- SuppressMessageAttribute.cs
- ConfigurationCollectionAttribute.cs
- MenuItemStyleCollection.cs
- PageParser.cs
- EntityConnection.cs
- Pointer.cs
- WebPartTransformer.cs
- DataGrid.cs
- GPStream.cs
- SmiTypedGetterSetter.cs
- ValidationErrorCollection.cs
- ReachBasicContext.cs