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
- XmlSchemaIdentityConstraint.cs
- TextDecoration.cs
- PageTheme.cs
- ItemMap.cs
- HtmlHead.cs
- TextViewSelectionProcessor.cs
- Sql8ExpressionRewriter.cs
- TableCellCollection.cs
- TextAction.cs
- MouseGestureConverter.cs
- XmlWriterDelegator.cs
- OperationAbortedException.cs
- GridItem.cs
- CheckBoxBaseAdapter.cs
- PkcsUtils.cs
- FloaterBaseParagraph.cs
- RuntimeConfigLKG.cs
- Label.cs
- XsdDataContractExporter.cs
- _LazyAsyncResult.cs
- SqlPersonalizationProvider.cs
- BrowsableAttribute.cs
- WindowsNonControl.cs
- VolatileEnlistmentState.cs
- Int32.cs
- ZoneIdentityPermission.cs
- DesignTimeXamlWriter.cs
- SerializationAttributes.cs
- Window.cs
- TransformValueSerializer.cs
- PointUtil.cs
- PerfCounterSection.cs
- UntrustedRecipientException.cs
- EntityDataSourceReferenceGroup.cs
- ToolboxItemFilterAttribute.cs
- designeractionbehavior.cs
- CustomBindingElementCollection.cs
- CustomExpression.cs
- NeutralResourcesLanguageAttribute.cs
- PreviewPageInfo.cs
- WebPartVerbsEventArgs.cs
- ToolStripItemDataObject.cs
- BidOverLoads.cs
- MasterPageParser.cs
- Pen.cs
- Assert.cs
- LookupNode.cs
- DbReferenceCollection.cs
- HyperLinkStyle.cs
- SecurityKeyIdentifier.cs
- ISAPIWorkerRequest.cs
- mediaeventshelper.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- TailCallAnalyzer.cs
- DbConnectionStringCommon.cs
- MultiTrigger.cs
- OdbcConnectionPoolProviderInfo.cs
- SymbolType.cs
- UrlAuthFailedErrorFormatter.cs
- TabletDeviceInfo.cs
- CodeSubDirectory.cs
- EncoderParameter.cs
- SelectedCellsChangedEventArgs.cs
- TypeFieldSchema.cs
- CancelEventArgs.cs
- DesignerActionUI.cs
- ReflectPropertyDescriptor.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- _TLSstream.cs
- VisualBrush.cs
- UshortList2.cs
- ApplicationSettingsBase.cs
- DateTimeFormat.cs
- ClrProviderManifest.cs
- TextProperties.cs
- ToolTipAutomationPeer.cs
- WebPartConnectionsConnectVerb.cs
- Comparer.cs
- _LocalDataStoreMgr.cs
- Schema.cs
- XmlSchemaFacet.cs
- EventLogLink.cs
- XmlQueryStaticData.cs
- AutomationIdentifier.cs
- SystemDiagnosticsSection.cs
- MailAddress.cs
- MiniParameterInfo.cs
- DetailsViewModeEventArgs.cs
- AppDomainProtocolHandler.cs
- TripleDES.cs
- Queue.cs
- ProfilePropertySettings.cs
- EnvelopedPkcs7.cs
- ViewGenResults.cs
- DynamicQueryableWrapper.cs
- ActivationArguments.cs
- ActivityBindForm.cs
- TdsParserStateObject.cs
- RuleAction.cs
- SiteMapNodeItemEventArgs.cs