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
- TransformerInfo.cs
- DeflateStreamAsyncResult.cs
- UnsafeNativeMethods.cs
- WebBrowsableAttribute.cs
- ShapingEngine.cs
- PriorityItem.cs
- HostingEnvironment.cs
- BufferedWebEventProvider.cs
- RawUIStateInputReport.cs
- FreezableDefaultValueFactory.cs
- ThicknessAnimationUsingKeyFrames.cs
- Attributes.cs
- HandlerBase.cs
- Axis.cs
- DataKey.cs
- IdentitySection.cs
- ProcessThreadCollection.cs
- DocumentPageHost.cs
- CodeDomDesignerLoader.cs
- WindowsRichEdit.cs
- StorageEndPropertyMapping.cs
- IdentitySection.cs
- Helpers.cs
- IntegerValidator.cs
- BufferedGraphicsContext.cs
- BookmarkNameHelper.cs
- KeyboardDevice.cs
- AssemblySettingAttributes.cs
- FormsAuthenticationCredentials.cs
- QueryableDataSource.cs
- brushes.cs
- OpenTypeLayout.cs
- SQLChars.cs
- XmlResolver.cs
- DetailsViewInsertedEventArgs.cs
- ResourceAttributes.cs
- DataControlField.cs
- EntityConnection.cs
- DataListCommandEventArgs.cs
- Durable.cs
- UIElementHelper.cs
- DataGridViewEditingControlShowingEventArgs.cs
- GridViewUpdatedEventArgs.cs
- DateTimeOffsetConverter.cs
- UpDownBase.cs
- ObjectSelectorEditor.cs
- LongAverageAggregationOperator.cs
- SoapIncludeAttribute.cs
- XmlDictionaryReader.cs
- ObjectDataSourceDisposingEventArgs.cs
- XmlSerializerOperationFormatter.cs
- Transform3D.cs
- ToolStripPanel.cs
- Int16.cs
- WorkerRequest.cs
- DataSourceView.cs
- SqlBooleanMismatchVisitor.cs
- ToolStripLabel.cs
- AssemblyName.cs
- _Events.cs
- PersistenceTypeAttribute.cs
- DateTimeFormatInfoScanner.cs
- XmlLanguage.cs
- FixUpCollection.cs
- JulianCalendar.cs
- CommonDialog.cs
- EnumValAlphaComparer.cs
- ToolStripContentPanel.cs
- HttpRawResponse.cs
- FontNamesConverter.cs
- Int64KeyFrameCollection.cs
- DocumentGridContextMenu.cs
- Separator.cs
- DataGridLinkButton.cs
- ContainerActivationHelper.cs
- TextParagraphProperties.cs
- controlskin.cs
- DelegateBodyWriter.cs
- Parser.cs
- RuleSettings.cs
- MetaDataInfo.cs
- DropDownList.cs
- BlobPersonalizationState.cs
- BatchParser.cs
- WebServiceAttribute.cs
- UrlPropertyAttribute.cs
- DataGridViewCellValidatingEventArgs.cs
- dbenumerator.cs
- MethodToken.cs
- PieceDirectory.cs
- ResourcePool.cs
- HttpWrapper.cs
- PaperSize.cs
- BamlLocalizableResourceKey.cs
- FileRecordSequenceCompletedAsyncResult.cs
- CapiSafeHandles.cs
- DataGridViewEditingControlShowingEventArgs.cs
- Stack.cs
- Enumerable.cs
- AssemblyAttributesGoHere.cs