Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- SetStateDesigner.cs
- EnterpriseServicesHelper.cs
- RuntimeResourceSet.cs
- DataStorage.cs
- ConnectionConsumerAttribute.cs
- Hashtable.cs
- XmlSchemaComplexContent.cs
- Scheduling.cs
- OutputCacheProfile.cs
- ToolStripPanelSelectionBehavior.cs
- ExceptionRoutedEventArgs.cs
- InkCanvasSelection.cs
- HttpCookie.cs
- DrawingImage.cs
- SchemaObjectWriter.cs
- WebPartEditorApplyVerb.cs
- TraceSwitch.cs
- ComponentResourceKeyConverter.cs
- DeadCharTextComposition.cs
- Point3DValueSerializer.cs
- _IPv4Address.cs
- SQLDoubleStorage.cs
- CodeTypeParameterCollection.cs
- TripleDES.cs
- PauseStoryboard.cs
- DockProviderWrapper.cs
- ResourceAttributes.cs
- SoapBinding.cs
- TypeConverterHelper.cs
- storepermissionattribute.cs
- AccessedThroughPropertyAttribute.cs
- XmlSchemaCompilationSettings.cs
- BlobPersonalizationState.cs
- InputElement.cs
- FullTextState.cs
- ToolStripPanelRenderEventArgs.cs
- OracleLob.cs
- SplineKeyFrames.cs
- DynamicUpdateCommand.cs
- Keyboard.cs
- FormatterServices.cs
- TreeViewItem.cs
- LazyLoadBehavior.cs
- SocketPermission.cs
- DataSourceHelper.cs
- DPAPIProtectedConfigurationProvider.cs
- _UncName.cs
- SerializationObjectManager.cs
- TreeChangeInfo.cs
- glyphs.cs
- BoundColumn.cs
- NavigatingCancelEventArgs.cs
- SecuritySessionSecurityTokenAuthenticator.cs
- ViewBox.cs
- CompressedStack.cs
- AlternateView.cs
- Byte.cs
- LinkUtilities.cs
- CellRelation.cs
- PseudoWebRequest.cs
- EllipseGeometry.cs
- Misc.cs
- ValueOfAction.cs
- XmlCompatibilityReader.cs
- ObservableDictionary.cs
- PropertySegmentSerializer.cs
- EffectiveValueEntry.cs
- ContainerUtilities.cs
- CalendarButton.cs
- RegexCaptureCollection.cs
- Point3DConverter.cs
- latinshape.cs
- BindingWorker.cs
- VoiceSynthesis.cs
- ToolStripCollectionEditor.cs
- FormatterServices.cs
- FocusManager.cs
- RouteParametersHelper.cs
- GridViewCancelEditEventArgs.cs
- ToolStripItem.cs
- OAVariantLib.cs
- TagPrefixAttribute.cs
- SelectedCellsChangedEventArgs.cs
- XmlNamedNodeMap.cs
- NameGenerator.cs
- DataConnectionHelper.cs
- SqlRetyper.cs
- SizeConverter.cs
- NaturalLanguageHyphenator.cs
- ServiceOperationViewControl.cs
- ConnectionsZone.cs
- WebPartEventArgs.cs
- CharacterShapingProperties.cs
- TreeBuilder.cs
- TextBoxAutoCompleteSourceConverter.cs
- DataGridViewSelectedColumnCollection.cs
- SourceFileBuildProvider.cs
- ValuePattern.cs
- CellPartitioner.cs
- TextHidden.cs