Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / FlowLayoutSettings.cs / 1305376 / FlowLayoutSettings.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; ///[DefaultProperty("FlowDirection")] public class FlowLayoutSettings : LayoutSettings { internal FlowLayoutSettings(IArrangedElement owner) : base(owner) {} /// public override LayoutEngine LayoutEngine { get { return FlowLayout.Instance; } } /// [SRDescription(SR.FlowPanelFlowDirectionDescr)] [DefaultValue(FlowDirection.LeftToRight)] [SRCategory(SR.CatLayout)] public FlowDirection FlowDirection { get { return FlowLayout.GetFlowDirection(Owner); } set { FlowLayout.SetFlowDirection(Owner, value); Debug.Assert(FlowDirection == value, "FlowDirection should be the same as we set it"); } } /// [SRDescription(SR.FlowPanelWrapContentsDescr)] [DefaultValue(true)] [SRCategory(SR.CatLayout)] public bool WrapContents { get { return FlowLayout.GetWrapContents(Owner); } set { FlowLayout.SetWrapContents(Owner, value); Debug.Assert(WrapContents == value, "WrapContents should be the same as we set it"); } } public void SetFlowBreak(object child, bool value) { IArrangedElement element = FlowLayout.Instance.CastToArrangedElement(child); if (GetFlowBreak(child) != value) { CommonProperties.SetFlowBreak(element, value); } } public bool GetFlowBreak(object child) { IArrangedElement element = FlowLayout.Instance.CastToArrangedElement(child); return CommonProperties.GetFlowBreak(element); } } } // 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; ///[DefaultProperty("FlowDirection")] public class FlowLayoutSettings : LayoutSettings { internal FlowLayoutSettings(IArrangedElement owner) : base(owner) {} /// public override LayoutEngine LayoutEngine { get { return FlowLayout.Instance; } } /// [SRDescription(SR.FlowPanelFlowDirectionDescr)] [DefaultValue(FlowDirection.LeftToRight)] [SRCategory(SR.CatLayout)] public FlowDirection FlowDirection { get { return FlowLayout.GetFlowDirection(Owner); } set { FlowLayout.SetFlowDirection(Owner, value); Debug.Assert(FlowDirection == value, "FlowDirection should be the same as we set it"); } } /// [SRDescription(SR.FlowPanelWrapContentsDescr)] [DefaultValue(true)] [SRCategory(SR.CatLayout)] public bool WrapContents { get { return FlowLayout.GetWrapContents(Owner); } set { FlowLayout.SetWrapContents(Owner, value); Debug.Assert(WrapContents == value, "WrapContents should be the same as we set it"); } } public void SetFlowBreak(object child, bool value) { IArrangedElement element = FlowLayout.Instance.CastToArrangedElement(child); if (GetFlowBreak(child) != value) { CommonProperties.SetFlowBreak(element, value); } } public bool GetFlowBreak(object child) { IArrangedElement element = FlowLayout.Instance.CastToArrangedElement(child); return CommonProperties.GetFlowBreak(element); } } } // 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
- PropertyItem.cs
- validation.cs
- AssociationType.cs
- ClientType.cs
- sortedlist.cs
- EntityDescriptor.cs
- NameSpaceExtractor.cs
- FirewallWrapper.cs
- KeyGestureValueSerializer.cs
- DBProviderConfigurationHandler.cs
- EncodingInfo.cs
- UITypeEditor.cs
- MenuEventArgs.cs
- WindowsMenu.cs
- SizeIndependentAnimationStorage.cs
- TextHintingModeValidation.cs
- Condition.cs
- xsdvalidator.cs
- SecureEnvironment.cs
- NotifyParentPropertyAttribute.cs
- SrgsElementFactory.cs
- Invariant.cs
- SpotLight.cs
- EncryptedData.cs
- DateRangeEvent.cs
- OpCopier.cs
- DataContractSerializerOperationFormatter.cs
- XPathException.cs
- CreateUserErrorEventArgs.cs
- DbConnectionPoolIdentity.cs
- FacetDescription.cs
- GridViewColumnCollection.cs
- SystemColors.cs
- AbstractExpressions.cs
- SqlSelectClauseBuilder.cs
- HttpApplicationFactory.cs
- HostedHttpTransportManager.cs
- MimeTypePropertyAttribute.cs
- __FastResourceComparer.cs
- ImageKeyConverter.cs
- NetStream.cs
- ToolboxItemCollection.cs
- BoolExpression.cs
- RelativeSource.cs
- AutomationPatternInfo.cs
- PeekCompletedEventArgs.cs
- ThreadAttributes.cs
- precedingquery.cs
- DistinctQueryOperator.cs
- WorkflowViewService.cs
- SimpleHandlerBuildProvider.cs
- Signature.cs
- MaskedTextProvider.cs
- DelegatedStream.cs
- CodeExpressionCollection.cs
- ProfileServiceManager.cs
- XmlNamespaceMappingCollection.cs
- BuildProviderAppliesToAttribute.cs
- DocumentPageTextView.cs
- TaskResultSetter.cs
- SqlCacheDependencyDatabaseCollection.cs
- OleDbDataAdapter.cs
- XPathNavigatorKeyComparer.cs
- PageSettings.cs
- BaseComponentEditor.cs
- shaperfactory.cs
- Normalization.cs
- EventHandlersStore.cs
- tibetanshape.cs
- EncryptedPackageFilter.cs
- OpenFileDialog.cs
- StorageEntityContainerMapping.cs
- SHA1Managed.cs
- ReadonlyMessageFilter.cs
- KnownTypesHelper.cs
- IntellisenseTextBox.designer.cs
- FilterException.cs
- DebugInfoExpression.cs
- ActivitySurrogateSelector.cs
- SoundPlayerAction.cs
- BaseTransportHeaders.cs
- CharStorage.cs
- DragEventArgs.cs
- CodeTypeReferenceCollection.cs
- MimeBasePart.cs
- CompilerTypeWithParams.cs
- CryptoApi.cs
- EntityContainerEntitySet.cs
- ResourcesBuildProvider.cs
- TaiwanLunisolarCalendar.cs
- ButtonPopupAdapter.cs
- AccessDataSourceDesigner.cs
- TrustSection.cs
- TraceProvider.cs
- ContainerAction.cs
- FileDialogPermission.cs
- MailAddress.cs
- AmbientValueAttribute.cs
- SourceFileInfo.cs
- MailMessage.cs