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
- FormViewUpdateEventArgs.cs
- HttpDictionary.cs
- WsatEtwTraceListener.cs
- RelatedEnd.cs
- SafeSecurityHandles.cs
- QualifiedCellIdBoolean.cs
- QuerySettings.cs
- ComponentChangingEvent.cs
- UserControlDocumentDesigner.cs
- GetWinFXPath.cs
- DbConnectionClosed.cs
- WebPartActionVerb.cs
- Matrix.cs
- StrongNameMembershipCondition.cs
- SQLDecimalStorage.cs
- XmlSchemaSimpleTypeUnion.cs
- CodeSnippetCompileUnit.cs
- WpfWebRequestHelper.cs
- StateMachineWorkflow.cs
- EntitySqlException.cs
- ModuleConfigurationInfo.cs
- XmlSchemaComplexContentExtension.cs
- TextSchema.cs
- PartBasedPackageProperties.cs
- Schema.cs
- IPPacketInformation.cs
- PostBackOptions.cs
- FileDialog_Vista_Interop.cs
- XamlLoadErrorInfo.cs
- BasicKeyConstraint.cs
- AssociatedControlConverter.cs
- ConstraintManager.cs
- LayeredChannelListener.cs
- MimeTypeMapper.cs
- AnyReturnReader.cs
- ConnectorRouter.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- SHA1Managed.cs
- OdbcRowUpdatingEvent.cs
- Route.cs
- SendingRequestEventArgs.cs
- PointLightBase.cs
- SamlAuthenticationClaimResource.cs
- RSAProtectedConfigurationProvider.cs
- MarkupProperty.cs
- StreamAsIStream.cs
- Query.cs
- IntegerCollectionEditor.cs
- MDIClient.cs
- ConstraintEnumerator.cs
- MenuItemStyleCollection.cs
- PersonalizationProvider.cs
- OleDbDataReader.cs
- AuthenticationModuleElement.cs
- BooleanFunctions.cs
- Context.cs
- TreeNodeStyleCollection.cs
- WebPart.cs
- InfoCardSymmetricCrypto.cs
- CompilationRelaxations.cs
- EntityDataSourceView.cs
- PresentationTraceSources.cs
- XmlSchemaChoice.cs
- TableRow.cs
- IPipelineRuntime.cs
- WebBrowserBase.cs
- ResourceExpressionBuilder.cs
- BindingMAnagerBase.cs
- EditorAttribute.cs
- VirtualDirectoryMappingCollection.cs
- DesignerCategoryAttribute.cs
- StaticExtensionConverter.cs
- RuleInfoComparer.cs
- GlyphingCache.cs
- SqlDataSourceCache.cs
- ClickablePoint.cs
- sqlmetadatafactory.cs
- EditorZoneAutoFormat.cs
- BitmapData.cs
- EmptyEnumerator.cs
- KeyMatchBuilder.cs
- BufferedGraphicsManager.cs
- WebPartEditorCancelVerb.cs
- XmlNamespaceDeclarationsAttribute.cs
- BuildProvider.cs
- XmlNamespaceDeclarationsAttribute.cs
- BufferManager.cs
- IWorkflowDebuggerService.cs
- MarkupWriter.cs
- AttributeCollection.cs
- ByteFacetDescriptionElement.cs
- HotSpot.cs
- DefaultMemberAttribute.cs
- RequestSecurityToken.cs
- HandleRef.cs
- DefaultProxySection.cs
- HtmlContainerControl.cs
- ThreadAttributes.cs
- DomainConstraint.cs
- TraceContextEventArgs.cs