Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Documents / BlockUIContainer.cs / 1305600 / 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
- BamlBinaryReader.cs
- HttpClientProtocol.cs
- DynamicDiscoveryDocument.cs
- CustomWebEventKey.cs
- SqlCommandBuilder.cs
- TextTreeInsertUndoUnit.cs
- TreeNode.cs
- OdbcTransaction.cs
- Internal.cs
- FilterException.cs
- PartialClassGenerationTaskInternal.cs
- DataGridItemCollection.cs
- InputLangChangeRequestEvent.cs
- TreeSet.cs
- RegularExpressionValidator.cs
- LineServicesCallbacks.cs
- ReferentialConstraint.cs
- CreateCardRequest.cs
- SqlUdtInfo.cs
- WindowsSysHeader.cs
- MediaContextNotificationWindow.cs
- WebPartDeleteVerb.cs
- HttpWriter.cs
- DbConnectionInternal.cs
- WmfPlaceableFileHeader.cs
- SafeNativeMethods.cs
- NumberSubstitution.cs
- ReadOnlyPropertyMetadata.cs
- CheckBoxList.cs
- TextInfo.cs
- ExtensionWindowResizeGrip.cs
- UpdateTranslator.cs
- XmlNodeList.cs
- MethodExpr.cs
- ButtonBase.cs
- EndOfStreamException.cs
- RewritingPass.cs
- CheckBoxFlatAdapter.cs
- XmlMembersMapping.cs
- LinkConverter.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- QueueTransferProtocol.cs
- ComponentGlyph.cs
- TimelineCollection.cs
- FacetValues.cs
- EllipseGeometry.cs
- WebPartTransformerAttribute.cs
- ListControl.cs
- ToolStripMenuItem.cs
- ToolStripItem.cs
- CodeAttributeDeclaration.cs
- SqlPersonalizationProvider.cs
- odbcmetadatacolumnnames.cs
- AdRotator.cs
- ToggleProviderWrapper.cs
- SeekStoryboard.cs
- DataGridRow.cs
- SystemInfo.cs
- TextBoxBase.cs
- DBPropSet.cs
- RuntimeWrappedException.cs
- GroupQuery.cs
- TableColumnCollection.cs
- XmlSchemaAnnotation.cs
- ISFClipboardData.cs
- PropertyItem.cs
- SoapException.cs
- RadioButtonList.cs
- SqlParameter.cs
- XPathDocumentIterator.cs
- ImportedPolicyConversionContext.cs
- AppDomainAttributes.cs
- MustUnderstandSoapException.cs
- _emptywebproxy.cs
- CodeAssignStatement.cs
- DataKeyPropertyAttribute.cs
- SimpleBitVector32.cs
- CounterSampleCalculator.cs
- HtmlInputPassword.cs
- TraceLevelStore.cs
- ToolStripItemImageRenderEventArgs.cs
- ClientRuntime.cs
- TouchFrameEventArgs.cs
- PointAnimationBase.cs
- ToolStripTextBox.cs
- Storyboard.cs
- ResourceReader.cs
- AttachedPropertyMethodSelector.cs
- InstanceNotReadyException.cs
- TextBoxRenderer.cs
- recordstatescratchpad.cs
- PolyLineSegment.cs
- DefaultAssemblyResolver.cs
- IdentityNotMappedException.cs
- SupportingTokenChannel.cs
- Rss20FeedFormatter.cs
- GeneralTransform2DTo3DTo2D.cs
- Guid.cs
- HttpResponse.cs
- ObsoleteAttribute.cs