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
- XPathNavigatorReader.cs
- QueryCacheManager.cs
- InputElement.cs
- DataBinding.cs
- CallbackHandler.cs
- OutputCacheModule.cs
- DeviceSpecific.cs
- AssemblyResolver.cs
- CompilerTypeWithParams.cs
- Separator.cs
- RegexRunner.cs
- SqlCacheDependencyDatabase.cs
- UniqueEventHelper.cs
- bindurihelper.cs
- ToolStripSeparatorRenderEventArgs.cs
- grammarelement.cs
- ObjectDesignerDataSourceView.cs
- IsolatedStorageFile.cs
- XmlHelper.cs
- DesignerCommandSet.cs
- MenuItem.cs
- COMException.cs
- ComponentGuaranteesAttribute.cs
- CustomAttributeSerializer.cs
- DataGridViewLinkCell.cs
- HitTestParameters3D.cs
- ClockController.cs
- DictionaryTraceRecord.cs
- WebPartDescription.cs
- LabelAutomationPeer.cs
- XmlQueryType.cs
- FamilyMapCollection.cs
- EmptyImpersonationContext.cs
- BaseTypeViewSchema.cs
- CssStyleCollection.cs
- TextReader.cs
- NumericUpDownAcceleration.cs
- FormatterServicesNoSerializableCheck.cs
- FileDetails.cs
- RequestQueue.cs
- AlternateView.cs
- MergeFailedEvent.cs
- NamespaceListProperty.cs
- WebEventCodes.cs
- EventNotify.cs
- Camera.cs
- SqlGatherProducedAliases.cs
- XmlSchemaSequence.cs
- ReadOnlyDataSourceView.cs
- ScriptingProfileServiceSection.cs
- WindowsIPAddress.cs
- XmlRawWriter.cs
- XmlNamespaceDeclarationsAttribute.cs
- TableLayoutColumnStyleCollection.cs
- DBSqlParser.cs
- LostFocusEventManager.cs
- ZipQueryOperator.cs
- SamlAdvice.cs
- NativeMethods.cs
- RtfFormatStack.cs
- SettingsPropertyCollection.cs
- CodeGotoStatement.cs
- CompilerErrorCollection.cs
- DateTimeSerializationSection.cs
- BitStack.cs
- InheritanceContextHelper.cs
- OAVariantLib.cs
- DataGridViewRow.cs
- PropertyEmitter.cs
- TextBoxAutomationPeer.cs
- ColorConverter.cs
- XmlILAnnotation.cs
- ApplicationDirectoryMembershipCondition.cs
- FloatSumAggregationOperator.cs
- FileChangesMonitor.cs
- iisPickupDirectory.cs
- ListenerBinder.cs
- Queue.cs
- PersonalizationEntry.cs
- Boolean.cs
- DebugView.cs
- InvokeWebService.cs
- AutomationPropertyInfo.cs
- TransactionState.cs
- ForeignKeyConstraint.cs
- IssuerInformation.cs
- MatchingStyle.cs
- SoapElementAttribute.cs
- LinkedList.cs
- TextureBrush.cs
- x509store.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- ISAPIApplicationHost.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- XmlSchemaFacet.cs
- ScaleTransform3D.cs
- PropertyDescriptorCollection.cs
- SqlClientWrapperSmiStreamChars.cs
- WinEventHandler.cs
- HtmlValidationSummaryAdapter.cs