Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Documents / BlockUIContainer.cs / 1 / BlockUIContainer.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: BlockUIContainer - a wrapper for embedded UIElements in text // flow content block collections // //--------------------------------------------------------------------------- using System.ComponentModel; // DesignerSerializationVisibility using System.Windows.Markup; // ContentProperty namespace System.Windows.Documents { ////// BlockUIContainer - a wrapper for embedded UIElements in text /// flow content block collections /// [ContentProperty("Child")] public class BlockUIContainer : Block { //------------------------------------------------------------------- // // Constructors // //------------------------------------------------------------------- #region Constructors ////// Initializes a new instance of BlockUIContainer element. /// ////// The purpose of this element is to be a wrapper for UIElements /// when they are embedded into text flow - as items of /// BlockCollections. /// public BlockUIContainer() : base() { } ////// Initializes an BlockUIContainer specifying its child UIElement /// /// /// UIElement set as a child of this block item /// public BlockUIContainer(UIElement uiElement) : base() { if (uiElement == null) { throw new ArgumentNullException("uiElement"); } this.Child = uiElement; } #endregion Constructors //-------------------------------------------------------------------- // // Public Properties // //------------------------------------------------------------------- #region Properties ////// The content spanned by this TextElement. /// public UIElement Child { get { return this.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as UIElement; } set { TextContainer textContainer = this.TextContainer; textContainer.BeginChange(); try { TextPointer contentStart = this.ContentStart; UIElement child = Child; if (child != null) { textContainer.DeleteContentInternal(contentStart, this.ContentEnd); ContainerTextElementField.ClearValue(child); } if (value != null) { ContainerTextElementField.SetValue(value, this); contentStart.InsertUIElement(value); } } finally { textContainer.EndChange(); } } } #endregion } } // 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: BlockUIContainer - a wrapper for embedded UIElements in text // flow content block collections // //--------------------------------------------------------------------------- using System.ComponentModel; // DesignerSerializationVisibility using System.Windows.Markup; // ContentProperty namespace System.Windows.Documents { ////// BlockUIContainer - a wrapper for embedded UIElements in text /// flow content block collections /// [ContentProperty("Child")] public class BlockUIContainer : Block { //------------------------------------------------------------------- // // Constructors // //------------------------------------------------------------------- #region Constructors ////// Initializes a new instance of BlockUIContainer element. /// ////// The purpose of this element is to be a wrapper for UIElements /// when they are embedded into text flow - as items of /// BlockCollections. /// public BlockUIContainer() : base() { } ////// Initializes an BlockUIContainer specifying its child UIElement /// /// /// UIElement set as a child of this block item /// public BlockUIContainer(UIElement uiElement) : base() { if (uiElement == null) { throw new ArgumentNullException("uiElement"); } this.Child = uiElement; } #endregion Constructors //-------------------------------------------------------------------- // // Public Properties // //------------------------------------------------------------------- #region Properties ////// The content spanned by this TextElement. /// public UIElement Child { get { return this.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as UIElement; } set { TextContainer textContainer = this.TextContainer; textContainer.BeginChange(); try { TextPointer contentStart = this.ContentStart; UIElement child = Child; if (child != null) { textContainer.DeleteContentInternal(contentStart, this.ContentEnd); ContainerTextElementField.ClearValue(child); } if (value != null) { ContainerTextElementField.SetValue(value, this); contentStart.InsertUIElement(value); } } finally { textContainer.EndChange(); } } } #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
- TabPage.cs
- SerTrace.cs
- DefaultDialogButtons.cs
- SelectionItemProviderWrapper.cs
- Journaling.cs
- TimeoutValidationAttribute.cs
- CodeComment.cs
- WaitForChangedResult.cs
- BamlMapTable.cs
- Content.cs
- XdrBuilder.cs
- Assembly.cs
- SecurityPolicySection.cs
- IndexedGlyphRun.cs
- ProtocolElement.cs
- InfoCardSymmetricCrypto.cs
- ContextMenu.cs
- DecimalSumAggregationOperator.cs
- Size3D.cs
- PageSetupDialog.cs
- DataObjectEventArgs.cs
- SpecularMaterial.cs
- RewritingValidator.cs
- AttachedAnnotationChangedEventArgs.cs
- WebConfigurationHostFileChange.cs
- __TransparentProxy.cs
- AssemblyGen.cs
- IpcClientManager.cs
- WmiInstallComponent.cs
- QueryOutputWriterV1.cs
- CodeTypeDeclarationCollection.cs
- PlainXmlWriter.cs
- UiaCoreTypesApi.cs
- HotSpot.cs
- TableProviderWrapper.cs
- DataControlCommands.cs
- Debug.cs
- ToolStripLocationCancelEventArgs.cs
- XmlNodeList.cs
- ListChangedEventArgs.cs
- SecurityTokenProvider.cs
- WebPartCollection.cs
- streamingZipPartStream.cs
- CodeDesigner.cs
- MultiByteCodec.cs
- FolderNameEditor.cs
- BinaryParser.cs
- RemotingConfiguration.cs
- CodeSnippetTypeMember.cs
- CommonRemoteMemoryBlock.cs
- StyleBamlTreeBuilder.cs
- ElementsClipboardData.cs
- DesignerLoader.cs
- DataTableExtensions.cs
- TrustSection.cs
- DataBoundControlParameterTarget.cs
- ListView.cs
- ButtonColumn.cs
- Reference.cs
- PathFigureCollectionValueSerializer.cs
- BaseTreeIterator.cs
- RootBuilder.cs
- CryptoConfig.cs
- RegexMatch.cs
- Literal.cs
- recordstatefactory.cs
- GetCardDetailsRequest.cs
- localization.cs
- SectionXmlInfo.cs
- MimePart.cs
- CodeNamespaceImport.cs
- WebFormDesignerActionService.cs
- HttpsHostedTransportConfiguration.cs
- TryCatch.cs
- DESCryptoServiceProvider.cs
- RestHandlerFactory.cs
- Int64Converter.cs
- Debug.cs
- TcpChannelFactory.cs
- FileRecordSequenceHelper.cs
- Baml2006KeyRecord.cs
- DataServiceResponse.cs
- SoapServerMessage.cs
- SafeNativeMethods.cs
- UInt32Converter.cs
- TableDesigner.cs
- XmlWrappingReader.cs
- tooltip.cs
- ConsumerConnectionPointCollection.cs
- DataPagerField.cs
- AssemblyAttributesGoHere.cs
- control.ime.cs
- HMAC.cs
- InheritanceAttribute.cs
- Control.cs
- Mapping.cs
- SHA256.cs
- SqlProviderManifest.cs
- Int64Storage.cs
- UriScheme.cs