Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Documents / Section.cs / 1 / Section.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Section element. // //--------------------------------------------------------------------------- using System.ComponentModel; using System.Windows.Markup; // ContentProperty namespace System.Windows.Documents { ////// Section element. It is an element which can contain a sequence of Block elements. /// [ContentProperty("Blocks")] public class Section : Block { //------------------------------------------------------------------- // // Constructors // //------------------------------------------------------------------- #region Constructors ////// Initializes a new instance of a Section class. /// public Section() : base() { } ////// Initializes a new instance of a Section class specifying a first Block child for it. /// /// /// Block element added to a Section as its first child. /// public Section(Block block) : base() { if (block == null) { throw new ArgumentNullException("block"); } this.Blocks.Add(block); } #endregion Constructors //-------------------------------------------------------------------- // // Public Properties // //------------------------------------------------------------------- #region Public Properties ////// The HasTrailingParagraphBreakOnPaste property specifies if paragraph break for the last paragraph /// in serialized clipboard format should be included upon paste or not. /// It is intended for use by clipboard serialization purpose: /// only on wrapping root ///element. /// Setting this property for regular elements in documents does not have any effect. /// /// This is not a [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [DefaultValue(true)] public bool HasTrailingParagraphBreakOnPaste { get { return !_ignoreTrailingParagraphBreakOnPaste; } set { _ignoreTrailingParagraphBreakOnPaste = !value; } } internal const string HasTrailingParagraphBreakOnPastePropertyName = "HasTrailingParagraphBreakOnPaste"; ///, because mechanisms like data binding, animation, styling /// are not supposed to work for it. /// /// Collection of Blocks contained in this Section. /// [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public BlockCollection Blocks { get { return new BlockCollection(this, /*isOwnerParent*/true); } } #endregion Public Properties //-------------------------------------------------------------------- // // Internal Methods // //---------------------------------------------------------------------- #region Internal Methods ////// This method is used by TypeDescriptor to determine if this property should /// be serialized. /// [EditorBrowsable(EditorBrowsableState.Never)] public bool ShouldSerializeBlocks(XamlDesignerSerializationManager manager) { return manager != null && manager.XmlWriter == null; } #endregion //------------------------------------------------------------------- // // Private Fields // //-------------------------------------------------------------------- #region Private Fields private bool _ignoreTrailingParagraphBreakOnPaste; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Section element. // //--------------------------------------------------------------------------- using System.ComponentModel; using System.Windows.Markup; // ContentProperty namespace System.Windows.Documents { ////// Section element. It is an element which can contain a sequence of Block elements. /// [ContentProperty("Blocks")] public class Section : Block { //------------------------------------------------------------------- // // Constructors // //------------------------------------------------------------------- #region Constructors ////// Initializes a new instance of a Section class. /// public Section() : base() { } ////// Initializes a new instance of a Section class specifying a first Block child for it. /// /// /// Block element added to a Section as its first child. /// public Section(Block block) : base() { if (block == null) { throw new ArgumentNullException("block"); } this.Blocks.Add(block); } #endregion Constructors //-------------------------------------------------------------------- // // Public Properties // //------------------------------------------------------------------- #region Public Properties ////// The HasTrailingParagraphBreakOnPaste property specifies if paragraph break for the last paragraph /// in serialized clipboard format should be included upon paste or not. /// It is intended for use by clipboard serialization purpose: /// only on wrapping root ///element. /// Setting this property for regular elements in documents does not have any effect. /// /// This is not a [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [DefaultValue(true)] public bool HasTrailingParagraphBreakOnPaste { get { return !_ignoreTrailingParagraphBreakOnPaste; } set { _ignoreTrailingParagraphBreakOnPaste = !value; } } internal const string HasTrailingParagraphBreakOnPastePropertyName = "HasTrailingParagraphBreakOnPaste"; ///, because mechanisms like data binding, animation, styling /// are not supposed to work for it. /// /// Collection of Blocks contained in this Section. /// [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public BlockCollection Blocks { get { return new BlockCollection(this, /*isOwnerParent*/true); } } #endregion Public Properties //-------------------------------------------------------------------- // // Internal Methods // //---------------------------------------------------------------------- #region Internal Methods ////// This method is used by TypeDescriptor to determine if this property should /// be serialized. /// [EditorBrowsable(EditorBrowsableState.Never)] public bool ShouldSerializeBlocks(XamlDesignerSerializationManager manager) { return manager != null && manager.XmlWriter == null; } #endregion //------------------------------------------------------------------- // // Private Fields // //-------------------------------------------------------------------- #region Private Fields private bool _ignoreTrailingParagraphBreakOnPaste; #endregion Private Fields } } // 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
- Vector3DAnimationUsingKeyFrames.cs
- TableLayoutColumnStyleCollection.cs
- RequiredArgumentAttribute.cs
- util.cs
- AttachedPropertyBrowsableAttribute.cs
- EmbeddedMailObject.cs
- SmtpFailedRecipientException.cs
- ZipIOLocalFileHeader.cs
- HttpRequest.cs
- Variable.cs
- TabletCollection.cs
- SqlProfileProvider.cs
- ChtmlTextWriter.cs
- GraphicsPathIterator.cs
- MatrixAnimationUsingPath.cs
- GC.cs
- UnsafeNativeMethods.cs
- GPRECT.cs
- Menu.cs
- ToolStripItem.cs
- InkCollectionBehavior.cs
- ServiceModelConfigurationElementCollection.cs
- BreakRecordTable.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- SecurityResources.cs
- PackageProperties.cs
- CodeAccessPermission.cs
- WhitespaceSignificantCollectionAttribute.cs
- GrammarBuilder.cs
- EntityCodeGenerator.cs
- ZipFileInfoCollection.cs
- ThreadPool.cs
- ColumnWidthChangingEvent.cs
- DataGridViewToolTip.cs
- Context.cs
- Schema.cs
- HostedTransportConfigurationBase.cs
- Header.cs
- ReferencedCollectionType.cs
- DataGridViewColumnTypeEditor.cs
- DependencySource.cs
- Resources.Designer.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ClientApiGenerator.cs
- AutomationPatternInfo.cs
- PeerCollaborationPermission.cs
- ToolBar.cs
- XmlILOptimizerVisitor.cs
- VectorAnimationUsingKeyFrames.cs
- URL.cs
- ValidationErrorCollection.cs
- WebPartsPersonalizationAuthorization.cs
- RegistryPermission.cs
- CodeDefaultValueExpression.cs
- HierarchicalDataSourceConverter.cs
- ImageMapEventArgs.cs
- ControlType.cs
- XpsDocumentEvent.cs
- RankException.cs
- CodeObjectCreateExpression.cs
- XmlNode.cs
- FixedSOMPage.cs
- WindowsSolidBrush.cs
- TextEditorCopyPaste.cs
- EventLogPermissionEntry.cs
- CodeActivityMetadata.cs
- PenThreadPool.cs
- BindingExpressionBase.cs
- NonClientArea.cs
- EventPrivateKey.cs
- CharAnimationUsingKeyFrames.cs
- IdentifierCreationService.cs
- MachineSettingsSection.cs
- TabItemAutomationPeer.cs
- MD5Cng.cs
- DetailsViewPagerRow.cs
- Common.cs
- DataSourceIDConverter.cs
- DesignSurfaceServiceContainer.cs
- ExternalFile.cs
- ParentUndoUnit.cs
- OracleSqlParser.cs
- HtmlGenericControl.cs
- externdll.cs
- HostingPreferredMapPath.cs
- QueryServiceConfigHandle.cs
- UriTemplateVariablePathSegment.cs
- validationstate.cs
- ResourceDefaultValueAttribute.cs
- SystemIPGlobalProperties.cs
- WebConfigurationHostFileChange.cs
- WebBrowserHelper.cs
- ModelVisual3D.cs
- DBCSCodePageEncoding.cs
- Win32PrintDialog.cs
- NamespaceImport.cs
- MultilineStringConverter.cs
- ThumbAutomationPeer.cs
- GroupAggregateExpr.cs
- WindowsGraphicsWrapper.cs