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
- CompilerGlobalScopeAttribute.cs
- ActiveXHelper.cs
- HttpServerVarsCollection.cs
- CollectionChangeEventArgs.cs
- DBNull.cs
- UInt16Storage.cs
- GrammarBuilderWildcard.cs
- TextEmbeddedObject.cs
- Style.cs
- x509store.cs
- TextBlockAutomationPeer.cs
- TreeIterator.cs
- UIElement3D.cs
- EntityClientCacheEntry.cs
- OSFeature.cs
- ValueHandle.cs
- UnsafeNativeMethodsCLR.cs
- KnownBoxes.cs
- WorkflowMarkupSerializerMapping.cs
- ResolveNameEventArgs.cs
- DataSourceControlBuilder.cs
- CodeVariableReferenceExpression.cs
- ConfigsHelper.cs
- AttributeCollection.cs
- TextEndOfParagraph.cs
- ActivityCodeDomReferenceService.cs
- TextElementEditingBehaviorAttribute.cs
- TabControl.cs
- SqlBuilder.cs
- AssemblyBuilder.cs
- CharUnicodeInfo.cs
- StringWriter.cs
- FixedSchema.cs
- TextCharacters.cs
- PKCS1MaskGenerationMethod.cs
- OutputScopeManager.cs
- CodeMemberEvent.cs
- RefreshPropertiesAttribute.cs
- LostFocusEventManager.cs
- DataSourceControlBuilder.cs
- TableRowGroup.cs
- TextOutput.cs
- DynamicPhysicalDiscoSearcher.cs
- DataTableMapping.cs
- SevenBitStream.cs
- ChangeDirector.cs
- WebColorConverter.cs
- IncomingWebRequestContext.cs
- DeploymentSection.cs
- DefaultEvaluationContext.cs
- TcpChannelHelper.cs
- entityreference_tresulttype.cs
- _NestedMultipleAsyncResult.cs
- SqlRowUpdatedEvent.cs
- TdsParameterSetter.cs
- TreeNodeBinding.cs
- ItemsControl.cs
- TextBoxLine.cs
- UnaryNode.cs
- ComponentResourceManager.cs
- NetCodeGroup.cs
- PageAsyncTask.cs
- MarkupObject.cs
- Menu.cs
- UnsafeNativeMethodsMilCoreApi.cs
- DocumentXPathNavigator.cs
- Point3DCollection.cs
- GridViewHeaderRowPresenter.cs
- IssuedSecurityTokenProvider.cs
- PerformanceCounterCategory.cs
- WebPartDisplayMode.cs
- XmlTextAttribute.cs
- DrawingGroupDrawingContext.cs
- PowerModeChangedEventArgs.cs
- StatusBarDrawItemEvent.cs
- CodeExporter.cs
- ProcessRequestArgs.cs
- SponsorHelper.cs
- SiteMapNodeItem.cs
- PropertyRecord.cs
- XmlNodeChangedEventManager.cs
- BindingContext.cs
- DesignerUtils.cs
- TextUtf8RawTextWriter.cs
- IteratorFilter.cs
- Button.cs
- XsltFunctions.cs
- HierarchicalDataBoundControl.cs
- VisualTreeUtils.cs
- FileReservationCollection.cs
- MethodRental.cs
- FlowDocumentPageViewerAutomationPeer.cs
- ItemChangedEventArgs.cs
- BamlVersionHeader.cs
- QilReference.cs
- CookieHandler.cs
- DNS.cs
- CheckBoxRenderer.cs
- ImpersonationContext.cs
- Compiler.cs