Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GridViewRow.cs
- DropAnimation.xaml.cs
- RequestCacheEntry.cs
- XmlDataSourceNodeDescriptor.cs
- TextTreeUndoUnit.cs
- EnterpriseServicesHelper.cs
- WebPartZoneCollection.cs
- DPTypeDescriptorContext.cs
- EventWaitHandle.cs
- Brush.cs
- SyntaxCheck.cs
- GacUtil.cs
- glyphs.cs
- UDPClient.cs
- AQNBuilder.cs
- ImpersonateTokenRef.cs
- ITreeGenerator.cs
- UncommonField.cs
- ListViewItem.cs
- LoginView.cs
- NeutralResourcesLanguageAttribute.cs
- StreamWriter.cs
- RpcResponse.cs
- LinkButton.cs
- PersonalizationEntry.cs
- ConnectionPoolManager.cs
- HtmlInputButton.cs
- CompilerTypeWithParams.cs
- ChannelDispatcher.cs
- TemplateContentLoader.cs
- TextTreeInsertElementUndoUnit.cs
- HtmlInputFile.cs
- NotImplementedException.cs
- DurationConverter.cs
- EntityType.cs
- SQLBytesStorage.cs
- ResourceAssociationSet.cs
- CodeDirectoryCompiler.cs
- TraceContextRecord.cs
- MailHeaderInfo.cs
- CompositeActivityCodeGenerator.cs
- SqlConnectionStringBuilder.cs
- TextEditorSelection.cs
- Speller.cs
- GroupBoxAutomationPeer.cs
- CharConverter.cs
- DataColumnMappingCollection.cs
- Message.cs
- Task.cs
- CodeLinePragma.cs
- BookmarkList.cs
- SqlCachedBuffer.cs
- WasNotInstalledException.cs
- Input.cs
- ImageCollectionEditor.cs
- ReferenceAssemblyAttribute.cs
- GetWorkflowTree.cs
- PropertyInformation.cs
- CompiledQuery.cs
- AutomationElement.cs
- ProvidePropertyAttribute.cs
- DataGridViewDataConnection.cs
- ManipulationDevice.cs
- Rijndael.cs
- JsonServiceDocumentSerializer.cs
- EmissiveMaterial.cs
- ScriptRef.cs
- IIS7UserPrincipal.cs
- XmlFileEditor.cs
- MatrixAnimationUsingKeyFrames.cs
- ReferenceConverter.cs
- CodeAssignStatement.cs
- Trustee.cs
- SelectionRange.cs
- ArrayListCollectionBase.cs
- InputMethod.cs
- BufferManager.cs
- ExternalCalls.cs
- InputEventArgs.cs
- DotExpr.cs
- RelatedView.cs
- CodeTypeDelegate.cs
- RijndaelManaged.cs
- Component.cs
- RolePrincipal.cs
- InstanceData.cs
- HtmlGenericControl.cs
- XmlSchemaSet.cs
- FontNameConverter.cs
- HtmlContainerControl.cs
- CollectionViewGroup.cs
- ModuleConfigurationInfo.cs
- ExtendedProtectionPolicyElement.cs
- XappLauncher.cs
- SqlFactory.cs
- PageAsyncTask.cs
- ApplicationActivator.cs
- ObjectListCommandCollection.cs
- shaperfactoryquerycacheentry.cs
- VirtualDirectoryMapping.cs