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
- DataList.cs
- PersonalizationStateInfoCollection.cs
- HttpRuntime.cs
- FtpCachePolicyElement.cs
- Camera.cs
- BaseTransportHeaders.cs
- ReachFixedDocumentSerializer.cs
- RelatedImageListAttribute.cs
- ListItemsCollectionEditor.cs
- DrawingGroup.cs
- DataFormats.cs
- BindingOperations.cs
- FontFamilyConverter.cs
- HostAdapter.cs
- ReturnValue.cs
- DnsEndPoint.cs
- CategoryGridEntry.cs
- CustomTypeDescriptor.cs
- PKCS1MaskGenerationMethod.cs
- Attributes.cs
- ControlParser.cs
- PasswordDeriveBytes.cs
- HtmlWindowCollection.cs
- assertwrapper.cs
- SmiEventSink_DeferedProcessing.cs
- Empty.cs
- BCryptHashAlgorithm.cs
- TimeIntervalCollection.cs
- RuntimeIdentifierPropertyAttribute.cs
- MatrixIndependentAnimationStorage.cs
- CmsUtils.cs
- DeferredElementTreeState.cs
- PropertyMetadata.cs
- PackWebRequestFactory.cs
- ThicknessKeyFrameCollection.cs
- EndOfStreamException.cs
- Polygon.cs
- Wildcard.cs
- LocalIdCollection.cs
- SimpleWebHandlerParser.cs
- CacheVirtualItemsEvent.cs
- ProfileService.cs
- IDataContractSurrogate.cs
- SoapFormatter.cs
- ActivityTrace.cs
- ClassImporter.cs
- EntityDataSourceWizardForm.cs
- _ListenerAsyncResult.cs
- formatter.cs
- SqlNotificationRequest.cs
- PropertyMapper.cs
- Geometry3D.cs
- CompilerState.cs
- SecurityTokenParameters.cs
- TransformerInfo.cs
- LicFileLicenseProvider.cs
- DefaultSerializationProviderAttribute.cs
- ModelEditingScope.cs
- WorkflowApplicationCompletedEventArgs.cs
- AccessKeyManager.cs
- MergePropertyDescriptor.cs
- ProviderConnectionPointCollection.cs
- ColumnCollection.cs
- DataGridViewTextBoxCell.cs
- ListControlConvertEventArgs.cs
- ToolBarButtonClickEvent.cs
- RepeaterCommandEventArgs.cs
- TypeForwardedToAttribute.cs
- SignatureToken.cs
- DataBinder.cs
- SafeNativeMethodsCLR.cs
- ItemMap.cs
- HttpChannelHelper.cs
- RotationValidation.cs
- SoapParser.cs
- SqlBooleanMismatchVisitor.cs
- NetTcpSecurityElement.cs
- Resources.Designer.cs
- TableLayoutSettingsTypeConverter.cs
- ContainerParaClient.cs
- UIElementCollection.cs
- COM2PropertyPageUITypeConverter.cs
- StylusTouchDevice.cs
- JapaneseLunisolarCalendar.cs
- CharKeyFrameCollection.cs
- ToolboxComponentsCreatingEventArgs.cs
- VideoDrawing.cs
- AddressingProperty.cs
- ToolboxBitmapAttribute.cs
- ItemCheckedEvent.cs
- GatewayDefinition.cs
- SiteMapPath.cs
- BamlTreeMap.cs
- ParallelTimeline.cs
- WsatConfiguration.cs
- DbConnectionPool.cs
- ProfileSection.cs
- TCPClient.cs
- NodeLabelEditEvent.cs
- FrameworkElementAutomationPeer.cs