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
- SocketInformation.cs
- SafeCertificateStore.cs
- SerialPort.cs
- SQLDoubleStorage.cs
- ProviderConnectionPoint.cs
- MessageQueue.cs
- Flattener.cs
- DynamicResourceExtensionConverter.cs
- BuildManagerHost.cs
- SpellCheck.cs
- _UriTypeConverter.cs
- AnnotationAuthorChangedEventArgs.cs
- WCFServiceClientProxyGenerator.cs
- DataControlLinkButton.cs
- FormViewDeletedEventArgs.cs
- CommonXSendMessage.cs
- RuntimeResourceSet.cs
- SelectionProcessor.cs
- Literal.cs
- WebSysDefaultValueAttribute.cs
- AccessorTable.cs
- HttpPostClientProtocol.cs
- NavigationExpr.cs
- CodeDomSerializerException.cs
- DbProviderSpecificTypePropertyAttribute.cs
- SqlParameter.cs
- ExpressionDumper.cs
- BevelBitmapEffect.cs
- DataRecordObjectView.cs
- GeometryHitTestParameters.cs
- XmlChildNodes.cs
- FrameDimension.cs
- BufferedStream.cs
- XPathAncestorIterator.cs
- MessageQueue.cs
- IgnoreDeviceFilterElementCollection.cs
- StructuralObject.cs
- TemplateParser.cs
- DrawTreeNodeEventArgs.cs
- RoutedEventHandlerInfo.cs
- TreeNodeCollection.cs
- XmlUrlResolver.cs
- InputReport.cs
- PnrpPeerResolver.cs
- Vector.cs
- TrimSurroundingWhitespaceAttribute.cs
- BrowsableAttribute.cs
- UITypeEditor.cs
- RowSpanVector.cs
- XmlNamespaceManager.cs
- handlecollector.cs
- IPHostEntry.cs
- DataStreams.cs
- OleDbRowUpdatingEvent.cs
- PackagePartCollection.cs
- RequestCacheEntry.cs
- XmlQueryCardinality.cs
- SecurityCookieModeValidator.cs
- ResourceSet.cs
- WindowsGraphics.cs
- MemberAccessException.cs
- ScriptingAuthenticationServiceSection.cs
- SafeRightsManagementSessionHandle.cs
- EnumConverter.cs
- GraphicsPath.cs
- cryptoapiTransform.cs
- InputBuffer.cs
- SafeProcessHandle.cs
- CipherData.cs
- ValidationErrorCollection.cs
- WindowsRegion.cs
- ImageInfo.cs
- ObjectSerializerFactory.cs
- OleDbStruct.cs
- BaseParagraph.cs
- ColorContextHelper.cs
- ImageCodecInfo.cs
- CallbackValidator.cs
- SignatureDescription.cs
- DataGridHyperlinkColumn.cs
- ExpressionNormalizer.cs
- WS2007HttpBindingCollectionElement.cs
- AppDomainManager.cs
- FontStyleConverter.cs
- DeflateEmulationStream.cs
- IdentityManager.cs
- XmlSchemaComplexContentRestriction.cs
- BindingSource.cs
- XsdValidatingReader.cs
- HashCoreRequest.cs
- TextChange.cs
- WinEventHandler.cs
- Invariant.cs
- MSAANativeProvider.cs
- AsmxEndpointPickerExtension.cs
- ComPlusTypeLoader.cs
- InkPresenter.cs
- SystemDiagnosticsSection.cs
- QueryPageSettingsEventArgs.cs
- DefaultIfEmptyQueryOperator.cs