Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / FlowLayoutPanel.cs / 1305376 / 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
- ToolBarOverflowPanel.cs
- ImportedPolicyConversionContext.cs
- FileSystemInfo.cs
- StringStorage.cs
- AbstractSvcMapFileLoader.cs
- _NestedSingleAsyncResult.cs
- RolePrincipal.cs
- LambdaCompiler.Statements.cs
- TabControlEvent.cs
- COM2ExtendedUITypeEditor.cs
- Menu.cs
- ParallelTimeline.cs
- LocalizableResourceBuilder.cs
- Panel.cs
- AttributeQuery.cs
- CardSpaceException.cs
- RangeValuePatternIdentifiers.cs
- ADMembershipProvider.cs
- WebEventCodes.cs
- SetterBase.cs
- UriScheme.cs
- CheckBoxDesigner.cs
- InputDevice.cs
- GB18030Encoding.cs
- CustomExpression.cs
- GZipDecoder.cs
- XPathItem.cs
- FirstMatchCodeGroup.cs
- TextTreeRootTextBlock.cs
- Camera.cs
- DBDataPermission.cs
- Shape.cs
- EditorBrowsableAttribute.cs
- AutomationPatternInfo.cs
- BamlTreeUpdater.cs
- ContactManager.cs
- GroupByExpressionRewriter.cs
- XmlSerializableWriter.cs
- RandomNumberGenerator.cs
- RightsManagementEncryptedStream.cs
- ReflectionUtil.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- DbgUtil.cs
- SharingService.cs
- CodeStatement.cs
- NamedElement.cs
- FixedSOMContainer.cs
- ValidationHelpers.cs
- XmlSchemaGroup.cs
- EmulateRecognizeCompletedEventArgs.cs
- AppDomainProtocolHandler.cs
- SessionPageStateSection.cs
- _SingleItemRequestCache.cs
- SchemaTableOptionalColumn.cs
- EntityDataSourceViewSchema.cs
- WindowsGraphics2.cs
- GridSplitterAutomationPeer.cs
- ViewCellRelation.cs
- NamespaceInfo.cs
- X509ScopedServiceCertificateElement.cs
- SoapInteropTypes.cs
- RegexRunnerFactory.cs
- DataViewListener.cs
- ByteConverter.cs
- PathGradientBrush.cs
- HttpWebRequestElement.cs
- CodeMemberProperty.cs
- CompressionTransform.cs
- Delegate.cs
- FontSizeConverter.cs
- CursorConverter.cs
- MetadataSerializer.cs
- Setter.cs
- Errors.cs
- XmlConvert.cs
- controlskin.cs
- XamlPathDataSerializer.cs
- XslAstAnalyzer.cs
- InertiaExpansionBehavior.cs
- LineServices.cs
- altserialization.cs
- TextWriterEngine.cs
- AuthenticationException.cs
- BitmapCodecInfoInternal.cs
- BindingListCollectionView.cs
- JavaScriptString.cs
- LogSwitch.cs
- TreeView.cs
- HTTPNotFoundHandler.cs
- DataGridViewCellParsingEventArgs.cs
- FormClosingEvent.cs
- Group.cs
- ActivityDesignerAccessibleObject.cs
- PolicyChain.cs
- FontSourceCollection.cs
- DependencyPropertyAttribute.cs
- Journaling.cs
- NavigationPropertyEmitter.cs
- DataAdapter.cs
- RequiredFieldValidator.cs