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
- ImageSourceConverter.cs
- FixedStringLookup.cs
- ProfileEventArgs.cs
- TextElementEnumerator.cs
- SqlMethodCallConverter.cs
- NextPreviousPagerField.cs
- TextBoxBase.cs
- FixedSOMPageConstructor.cs
- ScrollViewerAutomationPeer.cs
- OutKeywords.cs
- ItemsChangedEventArgs.cs
- AppSettingsExpressionBuilder.cs
- GridEntry.cs
- XPathAncestorQuery.cs
- PointConverter.cs
- SoapFormatExtensions.cs
- GenerateHelper.cs
- WindowsGraphics2.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- TextPointer.cs
- SplineQuaternionKeyFrame.cs
- AesCryptoServiceProvider.cs
- IriParsingElement.cs
- TableRowCollection.cs
- QuaternionRotation3D.cs
- PolicyManager.cs
- ServiceMoniker.cs
- System.Data.OracleClient_BID.cs
- SwitchElementsCollection.cs
- BitmapCache.cs
- ColorInterpolationModeValidation.cs
- ControlsConfig.cs
- WindowsToolbarItemAsMenuItem.cs
- BitmapSizeOptions.cs
- TransactionScopeDesigner.cs
- StaticSiteMapProvider.cs
- FontStretchConverter.cs
- ServiceMetadataBehavior.cs
- TextUtf8RawTextWriter.cs
- SessionParameter.cs
- TripleDES.cs
- MessageRpc.cs
- RoleExceptions.cs
- FontStretch.cs
- Repeater.cs
- BmpBitmapEncoder.cs
- HttpListenerException.cs
- UIElementParagraph.cs
- ContentType.cs
- HtmlShimManager.cs
- CodeVariableReferenceExpression.cs
- SymbolPair.cs
- EntityProxyTypeInfo.cs
- SqlUDTStorage.cs
- FlowDocumentView.cs
- Profiler.cs
- _ContextAwareResult.cs
- InputLangChangeRequestEvent.cs
- DataObject.cs
- CommentAction.cs
- AliasExpr.cs
- DbConnectionInternal.cs
- Point3DCollection.cs
- ReachVisualSerializerAsync.cs
- XmlSchemaAttributeGroupRef.cs
- SHA1Cng.cs
- XsltFunctions.cs
- MergablePropertyAttribute.cs
- DbReferenceCollection.cs
- RequestTimeoutManager.cs
- ComponentSerializationService.cs
- SQLMoney.cs
- WindowsFormsLinkLabel.cs
- HitTestResult.cs
- StretchValidation.cs
- MetadataArtifactLoaderResource.cs
- TextEncodedRawTextWriter.cs
- WebResourceAttribute.cs
- XmlFormatExtensionPointAttribute.cs
- Utils.cs
- ValueQuery.cs
- FileAuthorizationModule.cs
- RemotingService.cs
- XmlSchemas.cs
- Vector3DAnimation.cs
- DataServiceSaveChangesEventArgs.cs
- RuntimeConfigLKG.cs
- ConstructorBuilder.cs
- CookieProtection.cs
- Error.cs
- HttpCacheVary.cs
- UiaCoreApi.cs
- SystemIcmpV6Statistics.cs
- Error.cs
- GridViewEditEventArgs.cs
- XPathExpr.cs
- ContainerParaClient.cs
- XmlSchemaGroup.cs
- ValidationManager.cs
- ListSortDescription.cs