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
- WebPart.cs
- EnlistmentTraceIdentifier.cs
- CultureNotFoundException.cs
- AspNetHostingPermission.cs
- InfoCardClaim.cs
- LayoutTable.cs
- _SSPIWrapper.cs
- GenerateHelper.cs
- NonVisualControlAttribute.cs
- PrintControllerWithStatusDialog.cs
- MaxSessionCountExceededException.cs
- GlyphTypeface.cs
- StateItem.cs
- DrawingContextDrawingContextWalker.cs
- DataGridItem.cs
- Error.cs
- RequestTimeoutManager.cs
- Button.cs
- DataGridViewCheckBoxCell.cs
- TemplatedWizardStep.cs
- HeaderedItemsControl.cs
- OperationCanceledException.cs
- WeakReadOnlyCollection.cs
- TemplateLookupAction.cs
- XmlValidatingReader.cs
- SafeCoTaskMem.cs
- SafeRightsManagementPubHandle.cs
- WebPartCancelEventArgs.cs
- ProfileModule.cs
- ChtmlMobileTextWriter.cs
- MenuItemCollectionEditor.cs
- Composition.cs
- FastPropertyAccessor.cs
- DeclaredTypeElement.cs
- XmlBufferedByteStreamReader.cs
- DataRelation.cs
- DocumentPaginator.cs
- SqlBuffer.cs
- Error.cs
- SignatureToken.cs
- CodeNamespace.cs
- AutomationElement.cs
- CaseInsensitiveOrdinalStringComparer.cs
- TreeViewAutomationPeer.cs
- DbConnectionPoolGroupProviderInfo.cs
- SHA512.cs
- _NegotiateClient.cs
- ColorContextHelper.cs
- FtpWebResponse.cs
- XmlNavigatorStack.cs
- HMACSHA384.cs
- ArrayConverter.cs
- SoapAttributeAttribute.cs
- WhileDesigner.xaml.cs
- DrawToolTipEventArgs.cs
- DataService.cs
- RawKeyboardInputReport.cs
- DynamicPropertyReader.cs
- JsonServiceDocumentSerializer.cs
- ADMembershipUser.cs
- OdbcConnectionHandle.cs
- BasicKeyConstraint.cs
- CompressEmulationStream.cs
- ItemsControl.cs
- DbConnectionHelper.cs
- SimpleTextLine.cs
- ConstrainedDataObject.cs
- ResolveNameEventArgs.cs
- HashAlgorithm.cs
- ServiceRoute.cs
- UnicodeEncoding.cs
- TimelineCollection.cs
- BulletedListDesigner.cs
- configsystem.cs
- ClrProviderManifest.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- SiteOfOriginContainer.cs
- WindowsListViewGroupSubsetLink.cs
- RepeaterItemEventArgs.cs
- ContractNamespaceAttribute.cs
- StringFreezingAttribute.cs
- ToolStripRendererSwitcher.cs
- RenderCapability.cs
- DiagnosticsConfigurationHandler.cs
- SingleTagSectionHandler.cs
- XPathBinder.cs
- SafeRegistryHandle.cs
- RootAction.cs
- ConnectionStringsExpressionBuilder.cs
- HttpListenerContext.cs
- SecUtil.cs
- NumberAction.cs
- EventMappingSettingsCollection.cs
- SoapSchemaExporter.cs
- SchemaNotation.cs
- SaveFileDialog.cs
- ProfileGroupSettingsCollection.cs
- MergeLocalizationDirectives.cs
- WmpBitmapEncoder.cs
- PageRanges.cs