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
- Error.cs
- ParseChildrenAsPropertiesAttribute.cs
- Parameter.cs
- _FtpControlStream.cs
- Pen.cs
- OracleConnectionFactory.cs
- TrustLevelCollection.cs
- MemberExpressionHelper.cs
- DictionaryChange.cs
- ListBox.cs
- BigInt.cs
- SingleTagSectionHandler.cs
- PropertyItem.cs
- RijndaelManagedTransform.cs
- HashCodeCombiner.cs
- PageResolution.cs
- Bits.cs
- WindowsTokenRoleProvider.cs
- EarlyBoundInfo.cs
- WorkflowDesigner.cs
- DoubleAnimationUsingPath.cs
- GatewayDefinition.cs
- ChangeBlockUndoRecord.cs
- DecimalConverter.cs
- RegexCode.cs
- LambdaValue.cs
- TreeNodeStyle.cs
- ForeignKeyConstraint.cs
- ScriptingScriptResourceHandlerSection.cs
- Positioning.cs
- DurableInstanceProvider.cs
- SmiContextFactory.cs
- ViewBase.cs
- LayoutInformation.cs
- XsltArgumentList.cs
- RijndaelCryptoServiceProvider.cs
- Profiler.cs
- ListViewCancelEventArgs.cs
- InputElement.cs
- DataGridViewColumnCollectionEditor.cs
- remotingproxy.cs
- DisplayToken.cs
- CodeVariableDeclarationStatement.cs
- util.cs
- HitTestDrawingContextWalker.cs
- DataConnectionHelper.cs
- LinqDataSourceView.cs
- JsonWriterDelegator.cs
- UserControlBuildProvider.cs
- XmlQualifiedName.cs
- BaseInfoTable.cs
- UInt64.cs
- localization.cs
- ItemTypeToolStripMenuItem.cs
- FontInfo.cs
- MetadataItem_Static.cs
- ToolStripComboBox.cs
- BitmapCacheBrush.cs
- FtpRequestCacheValidator.cs
- HttpModuleActionCollection.cs
- XmlSchemaInferenceException.cs
- DataControlCommands.cs
- SqlDataSourceSelectingEventArgs.cs
- EditorZoneBase.cs
- EdmTypeAttribute.cs
- ButtonBase.cs
- PasswordTextContainer.cs
- CaseInsensitiveHashCodeProvider.cs
- SQLBoolean.cs
- TemplatedWizardStep.cs
- RootBrowserWindowAutomationPeer.cs
- DbConnectionHelper.cs
- HierarchicalDataBoundControl.cs
- FreezableCollection.cs
- PersonalizationStateQuery.cs
- ISFTagAndGuidCache.cs
- RelatedPropertyManager.cs
- ViewUtilities.cs
- InfoCardAsymmetricCrypto.cs
- AbsoluteQuery.cs
- Single.cs
- SubMenuStyleCollection.cs
- NominalTypeEliminator.cs
- GlyphInfoList.cs
- ConnectionsZone.cs
- ImagingCache.cs
- ColorAnimationBase.cs
- XmlSchemaComplexType.cs
- TextEncodedRawTextWriter.cs
- ContextInformation.cs
- FieldNameLookup.cs
- LineServices.cs
- ToolStripContentPanel.cs
- DataGridParentRows.cs
- StylusPointProperty.cs
- XmlSchemaProviderAttribute.cs
- DefaultValueConverter.cs
- TypeDescriptor.cs
- PathFigureCollection.cs
- IndependentlyAnimatedPropertyMetadata.cs