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
- BaseValidator.cs
- UrlAuthFailureHandler.cs
- NumericExpr.cs
- BindingsCollection.cs
- PseudoWebRequest.cs
- ClientFormsIdentity.cs
- StartUpEventArgs.cs
- QuotedPrintableStream.cs
- ServiceDesigner.cs
- AspNetCacheProfileAttribute.cs
- ApplicationException.cs
- ImageAnimator.cs
- BinaryMessageEncodingElement.cs
- SafeBitVector32.cs
- FrameAutomationPeer.cs
- ZoneMembershipCondition.cs
- ScaleTransform.cs
- TextCompositionManager.cs
- TableCellAutomationPeer.cs
- InstanceKey.cs
- CorrelationResolver.cs
- PartialList.cs
- BamlLocalizationDictionary.cs
- HashCodeCombiner.cs
- SoundPlayerAction.cs
- AuthenticationConfig.cs
- EventMetadata.cs
- ViewEventArgs.cs
- WebPartDescriptionCollection.cs
- DataGridRelationshipRow.cs
- DesignerLabelAdapter.cs
- ZipFileInfoCollection.cs
- EdmPropertyAttribute.cs
- TransformPatternIdentifiers.cs
- DiscoveryClientChannelFactory.cs
- BooleanAnimationUsingKeyFrames.cs
- FixedElement.cs
- CodeAttributeDeclarationCollection.cs
- While.cs
- ContentPosition.cs
- TextShapeableCharacters.cs
- ExternalDataExchangeService.cs
- UrlPropertyAttribute.cs
- BreakRecordTable.cs
- CodeNamespaceCollection.cs
- indexingfiltermarshaler.cs
- InkCanvasSelectionAdorner.cs
- NetworkInformationException.cs
- MultipleViewPatternIdentifiers.cs
- TdsParser.cs
- TextUtf8RawTextWriter.cs
- SimpleType.cs
- TagPrefixCollection.cs
- HttpPostedFile.cs
- ChannelSinkStacks.cs
- CodeMethodReturnStatement.cs
- GenericRootAutomationPeer.cs
- DataServiceRequestOfT.cs
- precedingsibling.cs
- SpStreamWrapper.cs
- CorrelationManager.cs
- DataGridCell.cs
- TraceSwitch.cs
- BinaryOperationBinder.cs
- EdmComplexTypeAttribute.cs
- RequestCacheEntry.cs
- ScriptServiceAttribute.cs
- OleDbWrapper.cs
- ToolStripContentPanel.cs
- ReliableDuplexSessionChannel.cs
- ExecutionEngineException.cs
- XmlBinaryReader.cs
- ParallelQuery.cs
- RightsManagementEncryptionTransform.cs
- UInt64.cs
- XmlSiteMapProvider.cs
- SoapFault.cs
- mactripleDES.cs
- FileSecurity.cs
- PresentationTraceSources.cs
- TypeConvertions.cs
- AlphaSortedEnumConverter.cs
- Overlapped.cs
- ToolStripItemEventArgs.cs
- TextSpanModifier.cs
- Wizard.cs
- ClientConfigurationSystem.cs
- DataControlExtensions.cs
- NeutralResourcesLanguageAttribute.cs
- UpdatePanel.cs
- SamlAdvice.cs
- CodeTypeMember.cs
- GZipDecoder.cs
- WebPartCancelEventArgs.cs
- CompressedStack.cs
- Part.cs
- KnownAssembliesSet.cs
- VideoDrawing.cs
- DataControlButton.cs
- PerformanceCounterManager.cs