Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebPartConnectionsCancelVerb.cs
- PrintPreviewControl.cs
- Rectangle.cs
- CustomAttribute.cs
- MenuCommandsChangedEventArgs.cs
- DisplayNameAttribute.cs
- StatusBarAutomationPeer.cs
- LockedHandleGlyph.cs
- DesigntimeLicenseContextSerializer.cs
- CalculatedColumn.cs
- BaseAddressPrefixFilterElementCollection.cs
- SafeHandles.cs
- WindowsListBox.cs
- UpdateCommandGenerator.cs
- SerialPinChanges.cs
- TypeDescriptor.cs
- ValidationEventArgs.cs
- UnsafeCollabNativeMethods.cs
- SequenceDesigner.cs
- DirectionalLight.cs
- TrustManager.cs
- Group.cs
- IntSecurity.cs
- IdentityNotMappedException.cs
- QuaternionRotation3D.cs
- RemotingServices.cs
- AttributeQuery.cs
- ContentPlaceHolder.cs
- RuleRefElement.cs
- EncodingNLS.cs
- ParameterCollection.cs
- EntityTypeBase.cs
- SizeIndependentAnimationStorage.cs
- WorkflowLayouts.cs
- SafeProcessHandle.cs
- New.cs
- XmlExtensionFunction.cs
- DecoderBestFitFallback.cs
- BlobPersonalizationState.cs
- Utils.cs
- ButtonRenderer.cs
- DesignerDataTable.cs
- SecurityElement.cs
- ParameterReplacerVisitor.cs
- JapaneseLunisolarCalendar.cs
- TimeStampChecker.cs
- ExpressionPrinter.cs
- SystemMulticastIPAddressInformation.cs
- DetailsView.cs
- XDRSchema.cs
- OdbcConnectionOpen.cs
- ConnectionStringsExpressionEditor.cs
- SqlInternalConnectionSmi.cs
- ShellProvider.cs
- UmAlQuraCalendar.cs
- ProfilePropertyMetadata.cs
- EntityDataSourceDataSelectionPanel.cs
- SiteMapNodeItemEventArgs.cs
- Missing.cs
- DynamicRenderer.cs
- GlobalProxySelection.cs
- CalendarAutomationPeer.cs
- PingOptions.cs
- SHA256.cs
- Solver.cs
- FrameworkRichTextComposition.cs
- WebPartCloseVerb.cs
- DataBindingHandlerAttribute.cs
- SafeRightsManagementQueryHandle.cs
- SmtpReplyReaderFactory.cs
- COM2IDispatchConverter.cs
- Popup.cs
- ThreadAbortException.cs
- XamlPathDataSerializer.cs
- GeneralTransform3D.cs
- AsnEncodedData.cs
- CodeTypeParameterCollection.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- UnsupportedPolicyOptionsException.cs
- PipelineModuleStepContainer.cs
- ProfileGroupSettings.cs
- CalendarKeyboardHelper.cs
- Viewport2DVisual3D.cs
- HandleRef.cs
- PathGradientBrush.cs
- AudioBase.cs
- WindowsRichEditRange.cs
- returneventsaver.cs
- MachinePropertyVariants.cs
- LinkedResource.cs
- EntityDataSourceContainerNameConverter.cs
- CommandBindingCollection.cs
- TextBoxView.cs
- StrokeCollectionConverter.cs
- ProcessModuleCollection.cs
- NotSupportedException.cs
- ToolboxDataAttribute.cs
- SerializationUtility.cs
- ScalarOps.cs
- XmlSchemaSimpleTypeRestriction.cs