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
- Zone.cs
- DynamicPropertyReader.cs
- Operator.cs
- GestureRecognizer.cs
- InstanceDataCollectionCollection.cs
- ControllableStoryboardAction.cs
- ItemType.cs
- EndpointConfigContainer.cs
- embossbitmapeffect.cs
- XmlQueryOutput.cs
- TextCollapsingProperties.cs
- ReadOnlyPropertyMetadata.cs
- filewebresponse.cs
- ExpressionBuilder.cs
- TabPanel.cs
- ChildTable.cs
- OneOfElement.cs
- BinaryWriter.cs
- BasicHttpBindingElement.cs
- Base64Decoder.cs
- ConnectionProviderAttribute.cs
- HandlerBase.cs
- EventLogConfiguration.cs
- UnsignedPublishLicense.cs
- ConnectionStringsExpressionBuilder.cs
- RuleInfoComparer.cs
- GridViewSortEventArgs.cs
- DBConnectionString.cs
- GridViewCommandEventArgs.cs
- BlockExpression.cs
- XmlSchemaDocumentation.cs
- COM2PropertyBuilderUITypeEditor.cs
- UnsafeNativeMethods.cs
- CultureSpecificStringDictionary.cs
- DelayedRegex.cs
- DataGridViewRowConverter.cs
- CompilationLock.cs
- ConsumerConnectionPointCollection.cs
- TextFormatterContext.cs
- DesignBindingValueUIHandler.cs
- CryptoProvider.cs
- ResolveCriteria.cs
- FlowDocumentView.cs
- WebPartActionVerb.cs
- Content.cs
- NotificationContext.cs
- Validator.cs
- HierarchicalDataTemplate.cs
- DefaultProxySection.cs
- CryptoApi.cs
- GuidTagList.cs
- Html32TextWriter.cs
- ADConnectionHelper.cs
- CompilationLock.cs
- MinMaxParagraphWidth.cs
- DrawItemEvent.cs
- SqlProcedureAttribute.cs
- MarshalDirectiveException.cs
- SpecialFolderEnumConverter.cs
- EncodingDataItem.cs
- EditorZone.cs
- DragStartedEventArgs.cs
- XmlSerializerVersionAttribute.cs
- SafeFileMapViewHandle.cs
- SapiRecoInterop.cs
- ApplicationSecurityManager.cs
- SingleStorage.cs
- UnmanagedMemoryStreamWrapper.cs
- WebPartMenu.cs
- ImageCodecInfo.cs
- RealProxy.cs
- PolyQuadraticBezierSegment.cs
- MessageHeaderAttribute.cs
- WebServiceResponse.cs
- MULTI_QI.cs
- Crc32Helper.cs
- StylusPlugin.cs
- ViewBase.cs
- LayoutExceptionEventArgs.cs
- SignatureConfirmations.cs
- XhtmlBasicValidatorAdapter.cs
- PointHitTestResult.cs
- SevenBitStream.cs
- Underline.cs
- QuaternionRotation3D.cs
- Nullable.cs
- Size.cs
- EventSourceCreationData.cs
- ThumbAutomationPeer.cs
- ProfilePropertySettings.cs
- Random.cs
- HtmlTableRow.cs
- Clock.cs
- Rfc2898DeriveBytes.cs
- ClientScriptManager.cs
- IMembershipProvider.cs
- QilList.cs
- ChangeTracker.cs
- OracleConnectionStringBuilder.cs
- SortableBindingList.cs