Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- AuthenticationSection.cs
- TreeBuilder.cs
- KoreanLunisolarCalendar.cs
- MultiView.cs
- PeerName.cs
- AtomServiceDocumentSerializer.cs
- UnmanagedMarshal.cs
- MexHttpBindingElement.cs
- BeginEvent.cs
- ContentControl.cs
- Trace.cs
- QueryParameter.cs
- WebPartCloseVerb.cs
- FloaterParaClient.cs
- HandlerMappingMemo.cs
- RemoteWebConfigurationHostStream.cs
- VerificationException.cs
- XmlSiteMapProvider.cs
- WindowsScrollBar.cs
- HttpVersion.cs
- ValueTypeFixupInfo.cs
- ConfigXmlAttribute.cs
- XmlChoiceIdentifierAttribute.cs
- Material.cs
- XmlHierarchyData.cs
- ProviderBase.cs
- ProcessProtocolHandler.cs
- IndexedGlyphRun.cs
- DecoderFallback.cs
- EditModeSwitchButton.cs
- TextEditorParagraphs.cs
- PointHitTestResult.cs
- ConfigurationProperty.cs
- SizeChangedEventArgs.cs
- ControlParameter.cs
- BufferModeSettings.cs
- StorageEntitySetMapping.cs
- BrushValueSerializer.cs
- XmlChoiceIdentifierAttribute.cs
- ClientSideQueueItem.cs
- TypeCollectionPropertyEditor.cs
- TextEditorCopyPaste.cs
- LinqDataSourceView.cs
- ConfigXmlSignificantWhitespace.cs
- BaseTypeViewSchema.cs
- rsa.cs
- TextViewSelectionProcessor.cs
- CLSCompliantAttribute.cs
- OleDbSchemaGuid.cs
- HttpsTransportElement.cs
- ObjectItemCollection.cs
- LocationUpdates.cs
- FileDialogCustomPlace.cs
- DataViewListener.cs
- COM2EnumConverter.cs
- IResourceProvider.cs
- PopOutPanel.cs
- PolicyException.cs
- UIServiceHelper.cs
- Random.cs
- WebPartRestoreVerb.cs
- CryptoKeySecurity.cs
- ByteConverter.cs
- EntityDataSourceViewSchema.cs
- XPathNodeIterator.cs
- WebPartUserCapability.cs
- PeerInputChannelListener.cs
- XmlDataSourceView.cs
- FixedSOMImage.cs
- MimePart.cs
- ActivitySurrogate.cs
- CheckPair.cs
- Version.cs
- ByteAnimationBase.cs
- TraceProvider.cs
- _AutoWebProxyScriptEngine.cs
- CompModSwitches.cs
- MethodCallTranslator.cs
- InfiniteIntConverter.cs
- SerializationFieldInfo.cs
- SspiSafeHandles.cs
- InternalConfigEventArgs.cs
- DynamicDocumentPaginator.cs
- DummyDataSource.cs
- PathTooLongException.cs
- ObjectParameter.cs
- CompleteWizardStep.cs
- KeyFrames.cs
- ReachVisualSerializerAsync.cs
- FileDialog_Vista.cs
- BreakRecordTable.cs
- SmtpNegotiateAuthenticationModule.cs
- Rfc2898DeriveBytes.cs
- SqlPersonalizationProvider.cs
- SqlDuplicator.cs
- DummyDataSource.cs
- IntranetCredentialPolicy.cs
- XPathEmptyIterator.cs
- CodeExpressionCollection.cs
- Activity.cs