Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- QuaternionRotation3D.cs
- ChangeInterceptorAttribute.cs
- EncoderParameter.cs
- WebPartManager.cs
- _RequestCacheProtocol.cs
- EntityContainerRelationshipSetEnd.cs
- ConfigsHelper.cs
- XmlSchemaDatatype.cs
- BackgroundFormatInfo.cs
- TraceListeners.cs
- StringToken.cs
- TableItemStyle.cs
- Animatable.cs
- ComponentChangedEvent.cs
- GorillaCodec.cs
- mediaclock.cs
- URLString.cs
- OciHandle.cs
- AbstractDataSvcMapFileLoader.cs
- login.cs
- ObjectNotFoundException.cs
- EditorReuseAttribute.cs
- UserInitiatedNavigationPermission.cs
- TextStore.cs
- ComboBox.cs
- ContentPlaceHolder.cs
- PolyLineSegment.cs
- FileInfo.cs
- MapPathBasedVirtualPathProvider.cs
- Button.cs
- CodePageUtils.cs
- PixelShader.cs
- TrueReadOnlyCollection.cs
- TrustLevel.cs
- ThreadStaticAttribute.cs
- EtwTrace.cs
- OAVariantLib.cs
- GcSettings.cs
- SoundPlayer.cs
- PrePrepareMethodAttribute.cs
- Screen.cs
- XmlSchemaChoice.cs
- WebUtil.cs
- IResourceProvider.cs
- CodeCatchClauseCollection.cs
- PropertyBuilder.cs
- MobileTextWriter.cs
- LeaseManager.cs
- DoubleCollection.cs
- WebProxyScriptElement.cs
- DbSetClause.cs
- ByteAnimation.cs
- ColorMap.cs
- EventSetter.cs
- OLEDB_Enum.cs
- CompiledQueryCacheKey.cs
- ComplexObject.cs
- URLString.cs
- DataBoundControlAdapter.cs
- FieldDescriptor.cs
- SystemThemeKey.cs
- ParentQuery.cs
- ComponentChangingEvent.cs
- RegistryPermission.cs
- TargetControlTypeCache.cs
- Subtree.cs
- Stack.cs
- QueryProcessor.cs
- DataGridViewCellStateChangedEventArgs.cs
- BitmapEffect.cs
- ProfilePropertyMetadata.cs
- documentsequencetextview.cs
- TagNameToTypeMapper.cs
- WindowsStartMenu.cs
- PackageRelationshipCollection.cs
- ItemsControl.cs
- Decimal.cs
- TransformPatternIdentifiers.cs
- ToolStripSettings.cs
- FileUtil.cs
- MatrixValueSerializer.cs
- __Error.cs
- DeclaredTypeElementCollection.cs
- ObjectCacheHost.cs
- IRCollection.cs
- EntityTypeEmitter.cs
- RegularExpressionValidator.cs
- DataServiceResponse.cs
- DataGridRowsPresenter.cs
- TypeConverterValueSerializer.cs
- Oid.cs
- Documentation.cs
- PermissionListSet.cs
- WorkItem.cs
- ClientRolePrincipal.cs
- ViewStateException.cs
- DataGridSortCommandEventArgs.cs
- XmlCountingReader.cs
- ImagingCache.cs
- SQLRoleProvider.cs