Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- counter.cs
- XamlHostingSectionGroup.cs
- MimeWriter.cs
- ObjectNavigationPropertyMapping.cs
- SecureEnvironment.cs
- HorizontalAlignConverter.cs
- EnvironmentPermission.cs
- ToolboxItemAttribute.cs
- OdbcFactory.cs
- ProgressBarHighlightConverter.cs
- WebServiceErrorEvent.cs
- ApplicationBuildProvider.cs
- GridViewRowPresenterBase.cs
- ObjectPersistData.cs
- ExpressionDumper.cs
- ModelItemDictionaryImpl.cs
- TypeExtensionSerializer.cs
- SiteMapSection.cs
- DecoderBestFitFallback.cs
- ExportFileRequest.cs
- ValidationVisibilityAttribute.cs
- TabControl.cs
- LoadedOrUnloadedOperation.cs
- ComponentChangingEvent.cs
- ModifierKeysConverter.cs
- WorkflowRequestContext.cs
- RoleManagerEventArgs.cs
- SurrogateSelector.cs
- MessageBuilder.cs
- SqlDependencyUtils.cs
- SmiContext.cs
- TrustSection.cs
- GrammarBuilderBase.cs
- CodeIndexerExpression.cs
- Msec.cs
- ControlPropertyNameConverter.cs
- IODescriptionAttribute.cs
- XslAstAnalyzer.cs
- TextParagraphView.cs
- TemplateBuilder.cs
- LinqDataSourceUpdateEventArgs.cs
- RangeValuePattern.cs
- SystemResources.cs
- QuaternionRotation3D.cs
- QilName.cs
- GeneralTransformGroup.cs
- BamlBinaryWriter.cs
- Base64Encoder.cs
- XXXInfos.cs
- BStrWrapper.cs
- PersonalizablePropertyEntry.cs
- SessionViewState.cs
- EventLogConfiguration.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- PropertyChangingEventArgs.cs
- BaseAutoFormat.cs
- RankException.cs
- ContainerControl.cs
- BaseResourcesBuildProvider.cs
- SqlTransaction.cs
- MemberJoinTreeNode.cs
- ShaderEffect.cs
- RtfControlWordInfo.cs
- TextDecorationUnitValidation.cs
- QilScopedVisitor.cs
- DataKey.cs
- SecUtil.cs
- MutexSecurity.cs
- SqlMethodAttribute.cs
- RealizationContext.cs
- SafeArrayRankMismatchException.cs
- PrtCap_Public.cs
- Point3DConverter.cs
- UrlAuthFailedErrorFormatter.cs
- ListViewAutomationPeer.cs
- WebServiceBindingAttribute.cs
- GradientBrush.cs
- HttpApplication.cs
- RealProxy.cs
- FileAuthorizationModule.cs
- arabicshape.cs
- DataStreamFromComStream.cs
- PasswordTextNavigator.cs
- FileDialogCustomPlacesCollection.cs
- InvariantComparer.cs
- QuaternionValueSerializer.cs
- Int32Collection.cs
- BaseTemplateParser.cs
- WebPartMenuStyle.cs
- TreeViewItem.cs
- CallbackHandler.cs
- EventHandlerList.cs
- WebPartEditorCancelVerb.cs
- SiteOfOriginContainer.cs
- TraceSection.cs
- Int32Rect.cs
- XmlSchemaGroupRef.cs
- UnsafePeerToPeerMethods.cs
- COM2AboutBoxPropertyDescriptor.cs
- NameValueFileSectionHandler.cs