Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ // // 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
- ResourcePool.cs
- SessionEndingEventArgs.cs
- SmtpException.cs
- RandomNumberGenerator.cs
- StructuredTypeEmitter.cs
- CompilationLock.cs
- ResourceSetExpression.cs
- LayoutTableCell.cs
- RadioButton.cs
- SelectorAutomationPeer.cs
- ExpressionNode.cs
- XmlTypeMapping.cs
- HttpGetClientProtocol.cs
- QilList.cs
- XmlDataSourceView.cs
- DataControlExtensions.cs
- ProfileBuildProvider.cs
- ToolStripGripRenderEventArgs.cs
- MergeFilterQuery.cs
- StringAnimationUsingKeyFrames.cs
- SelectorItemAutomationPeer.cs
- ElementFactory.cs
- BooleanAnimationUsingKeyFrames.cs
- ResizeGrip.cs
- EntityModelSchemaGenerator.cs
- StateBag.cs
- CodeLabeledStatement.cs
- CalendarTable.cs
- RemotingSurrogateSelector.cs
- ExceptionUtil.cs
- EditorOptionAttribute.cs
- CreateUserErrorEventArgs.cs
- DependencyProperty.cs
- RtfNavigator.cs
- QuadraticBezierSegment.cs
- UnescapedXmlDiagnosticData.cs
- ConstraintEnumerator.cs
- SystemThemeKey.cs
- Lasso.cs
- InputReport.cs
- DCSafeHandle.cs
- WorkflowDesignerMessageFilter.cs
- HealthMonitoringSection.cs
- TempEnvironment.cs
- HybridDictionary.cs
- WindowsContainer.cs
- PasswordBoxAutomationPeer.cs
- HttpResponseHeader.cs
- EntityDataSourceWrapper.cs
- ItemsControl.cs
- DodSequenceMerge.cs
- ToolboxItemWrapper.cs
- XmlTextAttribute.cs
- Calendar.cs
- IDReferencePropertyAttribute.cs
- XmlSchemaAnnotated.cs
- JsonReaderWriterFactory.cs
- ConsumerConnectionPoint.cs
- WebPartEventArgs.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- CultureNotFoundException.cs
- DataGridViewLinkCell.cs
- SelectionChangedEventArgs.cs
- TableHeaderCell.cs
- HiddenFieldPageStatePersister.cs
- VSDExceptions.cs
- BooleanToVisibilityConverter.cs
- XsltException.cs
- CustomTypeDescriptor.cs
- MdImport.cs
- FlagsAttribute.cs
- DataGridViewCellStyleBuilderDialog.cs
- EventLogReader.cs
- TextDecorationCollectionConverter.cs
- X509Chain.cs
- Rectangle.cs
- GeometryModel3D.cs
- Interlocked.cs
- Point.cs
- ExpressionsCollectionConverter.cs
- ParserContext.cs
- DesignTimeTemplateParser.cs
- ChangeTracker.cs
- TextServicesLoader.cs
- AddressHeaderCollectionElement.cs
- CodePageUtils.cs
- DocobjHost.cs
- NegotiationTokenAuthenticator.cs
- UnmanagedMemoryStreamWrapper.cs
- DataServiceProviderWrapper.cs
- NamespaceDisplayAutomationPeer.cs
- DiscoveryEndpointElement.cs
- HttpResponse.cs
- WindowsAuthenticationEventArgs.cs
- HttpListener.cs
- ToolStripComboBox.cs
- EastAsianLunisolarCalendar.cs
- SystemWebCachingSectionGroup.cs
- ToolstripProfessionalRenderer.cs
- ZipIOModeEnforcingStream.cs