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
- CommandDevice.cs
- AxisAngleRotation3D.cs
- EventSinkHelperWriter.cs
- SqlDependencyUtils.cs
- FilterUserControlBase.cs
- SecurityRuntime.cs
- RecordBuilder.cs
- HierarchicalDataTemplate.cs
- ObjectRef.cs
- SqlConnectionFactory.cs
- GlyphInfoList.cs
- DiscreteKeyFrames.cs
- GradientBrush.cs
- PermissionSetTriple.cs
- XmlSchemaComplexContentExtension.cs
- CodeEventReferenceExpression.cs
- UriSection.cs
- _UriSyntax.cs
- DockEditor.cs
- CodeStatement.cs
- CopyAction.cs
- Enum.cs
- InvalidateEvent.cs
- BroadcastEventHelper.cs
- WorkflowCommandExtensionItem.cs
- SqlServices.cs
- StylusPointProperty.cs
- WpfKnownMemberInvoker.cs
- InteropDesigner.xaml.cs
- EditorZone.cs
- UriSection.cs
- EdmProperty.cs
- PerfService.cs
- InitializerFacet.cs
- LabelExpression.cs
- safex509handles.cs
- VisualStyleInformation.cs
- DebugView.cs
- BitmapEffectGroup.cs
- AsymmetricSignatureFormatter.cs
- HttpDebugHandler.cs
- EntityDataSourceMemberPath.cs
- WebServiceMethodData.cs
- AsymmetricKeyExchangeDeformatter.cs
- RightsManagementInformation.cs
- CacheRequest.cs
- MutexSecurity.cs
- TypeListConverter.cs
- SettingsSection.cs
- DisplayInformation.cs
- ZipPackage.cs
- base64Transforms.cs
- AssociatedControlConverter.cs
- CustomErrorsSection.cs
- DodSequenceMerge.cs
- ResourceExpression.cs
- InvokeWebServiceDesigner.cs
- PnrpPermission.cs
- WindowsAuthenticationEventArgs.cs
- RolePrincipal.cs
- CachedCompositeFamily.cs
- CompressedStack.cs
- OdbcInfoMessageEvent.cs
- RangeValidator.cs
- ResourcesChangeInfo.cs
- ToolStripLocationCancelEventArgs.cs
- TreeNodeStyle.cs
- PathFigure.cs
- ActivationArguments.cs
- TabControl.cs
- CngAlgorithmGroup.cs
- SupportsEventValidationAttribute.cs
- DiscoveryDocumentLinksPattern.cs
- SynchronizationContext.cs
- FixedSOMTableCell.cs
- StoreItemCollection.Loader.cs
- TypeUnloadedException.cs
- OdbcConnectionHandle.cs
- WindowsListViewItemStartMenu.cs
- IntSecurity.cs
- SignatureHelper.cs
- ResponseStream.cs
- TdsParserStateObject.cs
- TextServicesPropertyRanges.cs
- AvTrace.cs
- TransformerInfoCollection.cs
- IUnknownConstantAttribute.cs
- Point3DKeyFrameCollection.cs
- TextShapeableCharacters.cs
- ProxyAttribute.cs
- ToolStripItemTextRenderEventArgs.cs
- AbsoluteQuery.cs
- RequestSecurityTokenResponseCollection.cs
- ContainerParaClient.cs
- LogWriteRestartAreaAsyncResult.cs
- ArithmeticException.cs
- AsyncContentLoadedEventArgs.cs
- MsdtcWrapper.cs
- _LoggingObject.cs
- PixelFormatConverter.cs