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
- X509Chain.cs
- DbConnectionOptions.cs
- GlobalDataBindingHandler.cs
- BlockUIContainer.cs
- ITreeGenerator.cs
- OutputCacheProfile.cs
- FileUpload.cs
- ToolboxItemFilterAttribute.cs
- StringReader.cs
- StrokeCollection2.cs
- InsufficientExecutionStackException.cs
- SelectorAutomationPeer.cs
- WebPartHelpVerb.cs
- XmlReaderDelegator.cs
- documentation.cs
- COM2Properties.cs
- ResXDataNode.cs
- RowVisual.cs
- OracleConnectionString.cs
- TransactionChannel.cs
- ParenthesizePropertyNameAttribute.cs
- PermissionListSet.cs
- DataGridViewColumnHeaderCell.cs
- dsa.cs
- PersonalizationStateInfo.cs
- ClientScriptManager.cs
- SQLGuid.cs
- TypeDelegator.cs
- IIS7UserPrincipal.cs
- TokenBasedSet.cs
- FrameSecurityDescriptor.cs
- DesignOnlyAttribute.cs
- RequestQueue.cs
- TypeBuilderInstantiation.cs
- OracleCommand.cs
- Pair.cs
- SkinBuilder.cs
- SspiWrapper.cs
- EncodingInfo.cs
- ReadOnlyObservableCollection.cs
- ImageSource.cs
- TemplateBindingExtensionConverter.cs
- QilInvoke.cs
- DocumentPageTextView.cs
- ColumnMapProcessor.cs
- GradientStop.cs
- EntityConnection.cs
- SimpleTextLine.cs
- RawTextInputReport.cs
- TypeGeneratedEventArgs.cs
- ADMembershipProvider.cs
- CharConverter.cs
- SpellerHighlightLayer.cs
- FullTextLine.cs
- PinnedBufferMemoryStream.cs
- UpdatePanelControlTrigger.cs
- ExtendedProperty.cs
- ComNativeDescriptor.cs
- EndEvent.cs
- CalendarModeChangedEventArgs.cs
- MembershipUser.cs
- AssemblyResourceLoader.cs
- _NTAuthentication.cs
- PseudoWebRequest.cs
- XMLSchema.cs
- PointAnimation.cs
- ApplicationContext.cs
- TdsValueSetter.cs
- WebPartVerbsEventArgs.cs
- Root.cs
- DateTimeValueSerializerContext.cs
- PropertyPath.cs
- EncodingNLS.cs
- MappedMetaModel.cs
- CharacterMetricsDictionary.cs
- HostSecurityManager.cs
- DeleteMemberBinder.cs
- ClientType.cs
- CacheEntry.cs
- X509Certificate2.cs
- PropertyItem.cs
- CriticalFinalizerObject.cs
- ChildDocumentBlock.cs
- ImageCodecInfo.cs
- ServiceControllerDesigner.cs
- ValidatorCollection.cs
- ProcessModelSection.cs
- SystemIPv4InterfaceProperties.cs
- WebPartPersonalization.cs
- ParallelEnumerable.cs
- ScrollBarAutomationPeer.cs
- LowerCaseStringConverter.cs
- BindingNavigator.cs
- Rotation3D.cs
- TransformerConfigurationWizardBase.cs
- CommentEmitter.cs
- TimeSpanValidatorAttribute.cs
- DataBinding.cs
- ProfilePropertySettings.cs
- MouseEventArgs.cs