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
- UxThemeWrapper.cs
- recordstatescratchpad.cs
- localization.cs
- EntityTypeEmitter.cs
- DependencyPropertyConverter.cs
- recordstatescratchpad.cs
- HttpErrorTraceRecord.cs
- PartitionResolver.cs
- SatelliteContractVersionAttribute.cs
- ContentElement.cs
- RequestCacheEntry.cs
- XmlnsDefinitionAttribute.cs
- Transform.cs
- NameTable.cs
- Guid.cs
- XsltLibrary.cs
- ObjectResult.cs
- MemoryResponseElement.cs
- EventHandlersStore.cs
- BufferBuilder.cs
- MulticastOption.cs
- CharConverter.cs
- DataTable.cs
- XmlWriterTraceListener.cs
- CapiNative.cs
- RegexFCD.cs
- XmlReflectionMember.cs
- DbDataAdapter.cs
- DataGridViewRowsAddedEventArgs.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- WebEvents.cs
- XsdDataContractImporter.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- HandlerBase.cs
- XmlCDATASection.cs
- Missing.cs
- WebDisplayNameAttribute.cs
- WebPartRestoreVerb.cs
- Sorting.cs
- StorageRoot.cs
- RuntimeWrappedException.cs
- FillRuleValidation.cs
- PropertyGeneratedEventArgs.cs
- TypeUtils.cs
- AccessibleObject.cs
- StateMachineExecutionState.cs
- XhtmlBasicPanelAdapter.cs
- DesignerLoader.cs
- FontDriver.cs
- BaseDataBoundControl.cs
- FixedPageProcessor.cs
- __ConsoleStream.cs
- NullableBoolConverter.cs
- X509Utils.cs
- FaultDesigner.cs
- OleStrCAMarshaler.cs
- Utility.cs
- SQLMoney.cs
- BaseCAMarshaler.cs
- MSAAEventDispatcher.cs
- SqlXmlStorage.cs
- XmlSerializerFactory.cs
- UICuesEvent.cs
- DeclarativeConditionsCollection.cs
- IssuedTokenClientElement.cs
- AttachedAnnotationChangedEventArgs.cs
- DictionaryManager.cs
- x509store.cs
- JsonMessageEncoderFactory.cs
- SaveFileDialog.cs
- ResolveNameEventArgs.cs
- SmiMetaDataProperty.cs
- MD5CryptoServiceProvider.cs
- CodeSnippetStatement.cs
- ProvidersHelper.cs
- ScriptServiceAttribute.cs
- UnmanagedMarshal.cs
- TextSelectionHighlightLayer.cs
- CacheEntry.cs
- Subordinate.cs
- InitializingNewItemEventArgs.cs
- FloaterBaseParaClient.cs
- IsolatedStorageException.cs
- AppDomain.cs
- BinHexDecoder.cs
- RuntimeResourceSet.cs
- SchemaEntity.cs
- ControlCollection.cs
- HitTestWithGeometryDrawingContextWalker.cs
- StreamInfo.cs
- TakeOrSkipWhileQueryOperator.cs
- CodeArgumentReferenceExpression.cs
- ConfigsHelper.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- WebPartCollection.cs
- DataGridViewTextBoxColumn.cs
- SqlFormatter.cs
- _SslSessionsCache.cs
- LogStream.cs
- WindowManager.cs