Code:
/ FX-1434 / FX-1434 / 1.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
- StringBlob.cs
- ControlEvent.cs
- StringFreezingAttribute.cs
- FileLogRecordEnumerator.cs
- IPGlobalProperties.cs
- VirtualizedContainerService.cs
- FixedSOMElement.cs
- PolyLineSegment.cs
- SafeNativeMethods.cs
- Point3DCollection.cs
- ClockGroup.cs
- ApplicationGesture.cs
- DateRangeEvent.cs
- WhitespaceRuleReader.cs
- Configuration.cs
- QilExpression.cs
- IdentifierService.cs
- InstanceData.cs
- HtmlGenericControl.cs
- FilteredDataSetHelper.cs
- DataGridViewCellLinkedList.cs
- SystemWebCachingSectionGroup.cs
- BitmapData.cs
- PowerStatus.cs
- ModelPerspective.cs
- RegexCaptureCollection.cs
- IpcManager.cs
- ProgressBarAutomationPeer.cs
- ColorTransform.cs
- DoubleStorage.cs
- PriorityItem.cs
- BoolLiteral.cs
- CapacityStreamGeometryContext.cs
- GlyphsSerializer.cs
- WebPartTracker.cs
- Mapping.cs
- FaultCode.cs
- TextProperties.cs
- DirectionalLight.cs
- DefaultValueConverter.cs
- TextElementEnumerator.cs
- EntityModelSchemaGenerator.cs
- Padding.cs
- ECDsa.cs
- FilteredXmlReader.cs
- XmlSchemaParticle.cs
- XmlBindingWorker.cs
- WindowsFont.cs
- XmlSchemaSearchPattern.cs
- TableCellCollection.cs
- SqlConnectionFactory.cs
- TimerEventSubscription.cs
- XmlQueryStaticData.cs
- EllipseGeometry.cs
- UIElement3D.cs
- TextSelection.cs
- AtomicFile.cs
- NetCodeGroup.cs
- ScrollBar.cs
- FrugalMap.cs
- DomainUpDown.cs
- CellIdBoolean.cs
- TableSectionStyle.cs
- WebConfigurationHostFileChange.cs
- ListBase.cs
- NodeFunctions.cs
- TraceUtility.cs
- WeakEventManager.cs
- ProfileGroupSettings.cs
- DataBindingExpressionBuilder.cs
- MimeWriter.cs
- EdmComplexTypeAttribute.cs
- Hashtable.cs
- UrlPath.cs
- CodeLinePragma.cs
- DebugManager.cs
- EventDescriptorCollection.cs
- MessageBox.cs
- DeclarativeCatalogPart.cs
- XhtmlBasicCommandAdapter.cs
- Facet.cs
- LinearGradientBrush.cs
- XamlGridLengthSerializer.cs
- TemplateBindingExtensionConverter.cs
- GridViewColumnCollectionChangedEventArgs.cs
- TextView.cs
- SQLInt64Storage.cs
- HotSpotCollection.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- DesignerTransaction.cs
- ViewStateException.cs
- TransformerTypeCollection.cs
- SymbolType.cs
- ProfilePropertySettingsCollection.cs
- ThreadStateException.cs
- ClusterSafeNativeMethods.cs
- EdmMember.cs
- SmiXetterAccessMap.cs
- SafeLibraryHandle.cs
- HMACRIPEMD160.cs