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
- listviewsubitemcollectioneditor.cs
- XmlToDatasetMap.cs
- GridView.cs
- MissingMethodException.cs
- OleDbReferenceCollection.cs
- ProfileParameter.cs
- MergeFilterQuery.cs
- Task.cs
- DataSourceHelper.cs
- CDSCollectionETWBCLProvider.cs
- SynchronizationContext.cs
- TypeBuilderInstantiation.cs
- LinkedResource.cs
- XmlSerializationWriter.cs
- MasterPage.cs
- AutomationFocusChangedEventArgs.cs
- SafeNativeMethods.cs
- CancelRequestedQuery.cs
- indexingfiltermarshaler.cs
- FastEncoder.cs
- ReliabilityContractAttribute.cs
- NonPrimarySelectionGlyph.cs
- nulltextcontainer.cs
- CodeTypeParameter.cs
- XmlSerializationWriter.cs
- sqlnorm.cs
- StylusPointPropertyId.cs
- TraceSwitch.cs
- KeyNotFoundException.cs
- SubclassTypeValidatorAttribute.cs
- OracleCommandBuilder.cs
- WebPartConnectVerb.cs
- DataReceivedEventArgs.cs
- FilteredReadOnlyMetadataCollection.cs
- HandleRef.cs
- DataServiceResponse.cs
- DesignerMetadata.cs
- ChildChangedEventArgs.cs
- BitmapEffectRenderDataResource.cs
- ColumnHeader.cs
- TransactionWaitAsyncResult.cs
- ClientConfigurationSystem.cs
- SynchronizationLockException.cs
- PrintingPermissionAttribute.cs
- AbstractSvcMapFileLoader.cs
- WebControlAdapter.cs
- CodeRemoveEventStatement.cs
- RequestCacheEntry.cs
- XmlnsDefinitionAttribute.cs
- ColorAnimationUsingKeyFrames.cs
- ThicknessKeyFrameCollection.cs
- WindowsListViewGroup.cs
- EventSetter.cs
- SerializationFieldInfo.cs
- SkinBuilder.cs
- BasePattern.cs
- RuntimeArgumentHandle.cs
- StringAttributeCollection.cs
- DataViewListener.cs
- Object.cs
- TimerElapsedEvenArgs.cs
- TimeBoundedCache.cs
- MediaTimeline.cs
- SQLDateTimeStorage.cs
- FunctionImportMapping.cs
- Int32Storage.cs
- SamlAudienceRestrictionCondition.cs
- BulletedList.cs
- LassoSelectionBehavior.cs
- LinqDataSourceUpdateEventArgs.cs
- AuthorizationRule.cs
- DataBoundControl.cs
- SerializerDescriptor.cs
- Comparer.cs
- NamespaceImport.cs
- SqlParameter.cs
- OutputCacheSettings.cs
- ThrowHelper.cs
- WinEventTracker.cs
- SafeFindHandle.cs
- QueryableFilterUserControl.cs
- Exception.cs
- UriScheme.cs
- AsyncCompletedEventArgs.cs
- ClientData.cs
- RankException.cs
- XamlSerializationHelper.cs
- CapacityStreamGeometryContext.cs
- ExpandedProjectionNode.cs
- TransformPattern.cs
- SmiXetterAccessMap.cs
- EdmRelationshipRoleAttribute.cs
- XPathNodeList.cs
- DatagridviewDisplayedBandsData.cs
- TypeInitializationException.cs
- DocumentPageTextView.cs
- EventDescriptorCollection.cs
- AQNBuilder.cs
- SBCSCodePageEncoding.cs
- CultureInfo.cs