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
- SqlInfoMessageEvent.cs
- CollectionChangedEventManager.cs
- Source.cs
- ProtectedProviderSettings.cs
- CollectionChangedEventManager.cs
- AttachInfo.cs
- MsmqReceiveParameters.cs
- ProcessStartInfo.cs
- unsafenativemethodsother.cs
- ManipulationDevice.cs
- ToolBar.cs
- ConnectionsZone.cs
- ReflectionServiceProvider.cs
- WebPartVerb.cs
- ZoneLinkButton.cs
- TagNameToTypeMapper.cs
- RangeExpression.cs
- CollectionExtensions.cs
- NotifyParentPropertyAttribute.cs
- BridgeDataRecord.cs
- EventMap.cs
- WSTransactionSection.cs
- HostingEnvironment.cs
- DeviceContext2.cs
- SemaphoreFullException.cs
- FieldBuilder.cs
- UnSafeCharBuffer.cs
- StringSource.cs
- DataGridViewSelectedCellCollection.cs
- RbTree.cs
- XamlDesignerSerializationManager.cs
- DocumentViewerHelper.cs
- DefaultPropertiesToSend.cs
- AnonymousIdentificationSection.cs
- Brush.cs
- CustomAttribute.cs
- InstanceLockLostException.cs
- AuditLevel.cs
- Delegate.cs
- ListControlDesigner.cs
- Substitution.cs
- DataStorage.cs
- WebPartVerb.cs
- CachingHintValidation.cs
- FixedSOMGroup.cs
- CodeTypeDeclaration.cs
- DataTrigger.cs
- TopClause.cs
- Misc.cs
- DefaultValueAttribute.cs
- EntitySqlException.cs
- WindowsListViewScroll.cs
- MultiView.cs
- LoadMessageLogger.cs
- NetworkCredential.cs
- FilteredXmlReader.cs
- FixedLineResult.cs
- PageFunction.cs
- DocumentGrid.cs
- MultilineStringConverter.cs
- safex509handles.cs
- ServiceOperationParameter.cs
- SqlDataSourceStatusEventArgs.cs
- HtmlWindowCollection.cs
- ImmutablePropertyDescriptorGridEntry.cs
- ZipIOLocalFileHeader.cs
- AutomationProperties.cs
- XamlVector3DCollectionSerializer.cs
- PersonalizationProviderCollection.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DataSpaceManager.cs
- XmlCharacterData.cs
- XPathMessageFilter.cs
- OuterGlowBitmapEffect.cs
- WebServiceTypeData.cs
- SuppressIldasmAttribute.cs
- ZoneLinkButton.cs
- PerformanceCounterLib.cs
- BuildResult.cs
- BuildTopDownAttribute.cs
- SqlNotificationEventArgs.cs
- WebPartManagerDesigner.cs
- ClientTargetSection.cs
- LZCodec.cs
- HtmlInputPassword.cs
- AssociationTypeEmitter.cs
- StandardOleMarshalObject.cs
- ServiceThrottlingElement.cs
- EmptyEnumerator.cs
- LazyTextWriterCreator.cs
- ClickablePoint.cs
- ListManagerBindingsCollection.cs
- InputElement.cs
- HuffModule.cs
- MetadataConversionError.cs
- PermissionRequestEvidence.cs
- ActivityFunc.cs
- StylusButtonCollection.cs
- SQLByteStorage.cs
- CharKeyFrameCollection.cs