Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FolderBrowserDialog.cs
- PageRequestManager.cs
- DataReaderContainer.cs
- InputLangChangeEvent.cs
- ParallelLoopState.cs
- ZoomPercentageConverter.cs
- DependencyObject.cs
- QuaternionValueSerializer.cs
- VectorAnimationBase.cs
- ResolveDuplex11AsyncResult.cs
- RsaSecurityToken.cs
- SafeUserTokenHandle.cs
- RetrieveVirtualItemEventArgs.cs
- CodeSubDirectoriesCollection.cs
- ListParaClient.cs
- ActivationServices.cs
- InvalidPrinterException.cs
- TableLayoutStyle.cs
- PrinterUnitConvert.cs
- ConnectionStringSettingsCollection.cs
- ActiveXContainer.cs
- FaultPropagationQuery.cs
- SqlException.cs
- WsdlBuildProvider.cs
- XmlSchemaFacet.cs
- RenderTargetBitmap.cs
- NativeMethods.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- _ConnectOverlappedAsyncResult.cs
- SafeNativeMemoryHandle.cs
- UnsafeNativeMethods.cs
- TreeNodeStyleCollection.cs
- StyleXamlParser.cs
- ADMembershipUser.cs
- OleAutBinder.cs
- TdsParserHelperClasses.cs
- PointCollection.cs
- SortedSet.cs
- VirtualPath.cs
- DecimalStorage.cs
- ListViewHitTestInfo.cs
- ChangeTracker.cs
- SymmetricKeyWrap.cs
- WindowsProgressbar.cs
- MemberMaps.cs
- FileChangesMonitor.cs
- GeometryCombineModeValidation.cs
- LinkConverter.cs
- TextRangeEditTables.cs
- GetLastErrorDetailsRequest.cs
- SmtpNetworkElement.cs
- FormsAuthenticationModule.cs
- PartitionResolver.cs
- UidManager.cs
- SHA1CryptoServiceProvider.cs
- ValueTypeFixupInfo.cs
- WebPartAuthorizationEventArgs.cs
- RegexMatchCollection.cs
- CheckBoxList.cs
- RepeaterItemCollection.cs
- JoinTreeSlot.cs
- UriTemplateVariablePathSegment.cs
- RequestQueue.cs
- WebPartManager.cs
- FileResponseElement.cs
- SymbolPair.cs
- TokenBasedSetEnumerator.cs
- XmlChildEnumerator.cs
- Comparer.cs
- Membership.cs
- LogicalExpr.cs
- EncoderReplacementFallback.cs
- ForeignConstraint.cs
- DataBindingCollection.cs
- CompositionTarget.cs
- MissingMemberException.cs
- BaseAsyncResult.cs
- DataReaderContainer.cs
- BigInt.cs
- CompModSwitches.cs
- ObjectAnimationBase.cs
- AsmxEndpointPickerExtension.cs
- DataSvcMapFileSerializer.cs
- MSHTMLHostUtil.cs
- MeshGeometry3D.cs
- OutOfMemoryException.cs
- DateTimePicker.cs
- UIPropertyMetadata.cs
- PathData.cs
- SqlDataSourceView.cs
- CatalogPartCollection.cs
- SecurityException.cs
- RuntimeVariablesExpression.cs
- RunClient.cs
- RootProfilePropertySettingsCollection.cs
- DataGridViewImageColumn.cs
- ObjectCache.cs
- RegexTree.cs
- RootBrowserWindowProxy.cs
- XamlWriterExtensions.cs