Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- TextBox.cs
- ConfigurationLocationCollection.cs
- coordinatorfactory.cs
- KeyedHashAlgorithm.cs
- StackOverflowException.cs
- ThreadAttributes.cs
- WebPartCatalogCloseVerb.cs
- ProjectionCamera.cs
- PropertyCollection.cs
- CustomAttribute.cs
- IncrementalCompileAnalyzer.cs
- FrameworkContentElement.cs
- Geometry3D.cs
- WebPartConnectionsEventArgs.cs
- DataChangedEventManager.cs
- DataTransferEventArgs.cs
- GridViewColumnCollectionChangedEventArgs.cs
- TemplatedEditableDesignerRegion.cs
- webclient.cs
- OleDbConnectionInternal.cs
- CompilerTypeWithParams.cs
- ToolZoneDesigner.cs
- PeekCompletedEventArgs.cs
- JsonMessageEncoderFactory.cs
- ProcessProtocolHandler.cs
- QilSortKey.cs
- SerializationInfo.cs
- DescendantOverDescendantQuery.cs
- SrgsSemanticInterpretationTag.cs
- WrappedKeySecurityToken.cs
- GroupBoxAutomationPeer.cs
- MruCache.cs
- WebPartCloseVerb.cs
- DataTableTypeConverter.cs
- Lasso.cs
- NameValueConfigurationElement.cs
- BookmarkUndoUnit.cs
- BreakRecordTable.cs
- DocumentPage.cs
- CallTemplateAction.cs
- XmlDataContract.cs
- PeerInvitationResponse.cs
- KnowledgeBase.cs
- XmlAnyAttributeAttribute.cs
- EntityProxyFactory.cs
- ActivityInstanceMap.cs
- CombinedGeometry.cs
- CommandPlan.cs
- SetStateDesigner.cs
- TextEditorSelection.cs
- grammarelement.cs
- LogRecordSequence.cs
- MachineKeySection.cs
- AttachedProperty.cs
- ScriptResourceAttribute.cs
- AbsoluteQuery.cs
- SQLBinary.cs
- Icon.cs
- LambdaCompiler.Statements.cs
- SqlDataSourceCommandEventArgs.cs
- SamlNameIdentifierClaimResource.cs
- TrackingConditionCollection.cs
- PlainXmlSerializer.cs
- BitStream.cs
- ImageFormat.cs
- DescendantQuery.cs
- XamlVector3DCollectionSerializer.cs
- versioninfo.cs
- UnknownBitmapDecoder.cs
- ColumnWidthChangingEvent.cs
- HttpContextServiceHost.cs
- SamlAction.cs
- SafeLibraryHandle.cs
- XsltSettings.cs
- KeyValueConfigurationElement.cs
- SQLMembershipProvider.cs
- DataServiceResponse.cs
- DependencyProperty.cs
- WpfPayload.cs
- ConstraintEnumerator.cs
- ConfigurationLocationCollection.cs
- StringUtil.cs
- StreamResourceInfo.cs
- TextWriterTraceListener.cs
- AssociationType.cs
- IImplicitResourceProvider.cs
- DefaultWorkflowTransactionService.cs
- smtppermission.cs
- XmlSchemaImporter.cs
- RoleManagerModule.cs
- FamilyTypeface.cs
- CounterSampleCalculator.cs
- StrongTypingException.cs
- ManagementException.cs
- XmlSerializationGeneratedCode.cs
- Merger.cs
- DetailsViewPageEventArgs.cs
- TableHeaderCell.cs
- RegionInfo.cs
- MaskDescriptor.cs