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
- securitymgrsite.cs
- GACMembershipCondition.cs
- OdbcCommand.cs
- Drawing.cs
- XmlValidatingReader.cs
- JulianCalendar.cs
- EmptyStringExpandableObjectConverter.cs
- DataGridViewTopLeftHeaderCell.cs
- DataGridViewRowPostPaintEventArgs.cs
- DataGridTextBox.cs
- VectorCollectionConverter.cs
- assemblycache.cs
- TypeReference.cs
- MarkerProperties.cs
- DBSqlParserColumnCollection.cs
- XmlSchemaAttribute.cs
- CategoryGridEntry.cs
- ArrangedElementCollection.cs
- HttpsHostedTransportConfiguration.cs
- PasswordRecovery.cs
- CombinedGeometry.cs
- StyleXamlParser.cs
- CultureInfo.cs
- ColumnReorderedEventArgs.cs
- ConfigurationProperty.cs
- MSAAWinEventWrap.cs
- IconBitmapDecoder.cs
- Regex.cs
- InkCanvasAutomationPeer.cs
- NumericExpr.cs
- Int32Storage.cs
- SoapIncludeAttribute.cs
- CallId.cs
- DrawTreeNodeEventArgs.cs
- Transform3DGroup.cs
- InkSerializer.cs
- ConfigViewGenerator.cs
- Stack.cs
- PageContentCollection.cs
- TextServicesContext.cs
- UnmanagedMarshal.cs
- Vector3DConverter.cs
- IPHostEntry.cs
- CatalogZoneBase.cs
- ImageFormatConverter.cs
- ControlAdapter.cs
- PointLightBase.cs
- RelationshipConverter.cs
- regiisutil.cs
- StateWorkerRequest.cs
- BitStack.cs
- TabControl.cs
- CompilerInfo.cs
- SqlNamer.cs
- DataColumnPropertyDescriptor.cs
- TransformerInfo.cs
- WebPartDescriptionCollection.cs
- XmlSchemaObject.cs
- CollectionType.cs
- SafeHandles.cs
- HostingEnvironment.cs
- Soap11ServerProtocol.cs
- ApplicationSettingsBase.cs
- BoundField.cs
- ElementUtil.cs
- TransformConverter.cs
- BypassElementCollection.cs
- AccessViolationException.cs
- DataGridViewBindingCompleteEventArgs.cs
- OperationCanceledException.cs
- QuaternionAnimationUsingKeyFrames.cs
- XPathSingletonIterator.cs
- XmlBoundElement.cs
- LinqDataSourceContextEventArgs.cs
- DataGridViewSelectedCellCollection.cs
- MenuItemBindingCollection.cs
- IProvider.cs
- _SslStream.cs
- GetPageNumberCompletedEventArgs.cs
- ChtmlPhoneCallAdapter.cs
- SolidColorBrush.cs
- TypeResolver.cs
- XmlRawWriter.cs
- SchemaMerger.cs
- PaintValueEventArgs.cs
- SwitchElementsCollection.cs
- SecurityRequiresReviewAttribute.cs
- CroppedBitmap.cs
- SqlFormatter.cs
- XPathBuilder.cs
- TextRange.cs
- Graphics.cs
- _NativeSSPI.cs
- ExceptionAggregator.cs
- PointConverter.cs
- CollectionTypeElement.cs
- UnicastIPAddressInformationCollection.cs
- Operators.cs
- DropShadowBitmapEffect.cs
- ContainerUtilities.cs