Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- securitycriticaldataClass.cs
- SynchronousReceiveBehavior.cs
- SQLGuidStorage.cs
- DatagridviewDisplayedBandsData.cs
- SurrogateEncoder.cs
- UIPropertyMetadata.cs
- SimpleColumnProvider.cs
- NavigationWindowAutomationPeer.cs
- MobileTemplatedControlDesigner.cs
- While.cs
- NoClickablePointException.cs
- DSACryptoServiceProvider.cs
- VisualStyleTypesAndProperties.cs
- SystemIcons.cs
- ConfigurationErrorsException.cs
- RelationshipFixer.cs
- ContainerUtilities.cs
- Privilege.cs
- EndpointDispatcher.cs
- DesignerHost.cs
- Point4D.cs
- EntityFunctions.cs
- MexBindingBindingCollectionElement.cs
- TypeSystem.cs
- TaiwanCalendar.cs
- QilDataSource.cs
- XmlQueryStaticData.cs
- MouseActionValueSerializer.cs
- DataKeyArray.cs
- EventSetter.cs
- DataRecordObjectView.cs
- SqlCommandBuilder.cs
- PowerEase.cs
- NullableConverter.cs
- XmlFileEditor.cs
- WebPartCatalogCloseVerb.cs
- CollectionAdapters.cs
- ZipIOCentralDirectoryFileHeader.cs
- ButtonBase.cs
- TextCollapsingProperties.cs
- ComponentDesigner.cs
- SmiGettersStream.cs
- TypeBuilder.cs
- Visual.cs
- StyleBamlTreeBuilder.cs
- StructuredTypeEmitter.cs
- ConfigurationElementCollection.cs
- ResourceCategoryAttribute.cs
- MultiplexingFormatMapping.cs
- LoginCancelEventArgs.cs
- WebExceptionStatus.cs
- Utils.cs
- ParameterCollection.cs
- EntityClientCacheEntry.cs
- ToolStripGrip.cs
- SessionStateContainer.cs
- RsaSecurityToken.cs
- SchemaNamespaceManager.cs
- RenderContext.cs
- TextBreakpoint.cs
- Merger.cs
- ResXBuildProvider.cs
- ValidationContext.cs
- ItemCollection.cs
- TextMarkerSource.cs
- Vector.cs
- Wizard.cs
- UrlPath.cs
- HtmlButton.cs
- FormsAuthenticationConfiguration.cs
- CaseStatementSlot.cs
- EntityDataSourceWrapper.cs
- ParameterBuilder.cs
- _AcceptOverlappedAsyncResult.cs
- DataGridClipboardHelper.cs
- RelatedPropertyManager.cs
- _Events.cs
- NativeMethods.cs
- _ProxyRegBlob.cs
- OdbcErrorCollection.cs
- DataFieldConverter.cs
- LabelLiteral.cs
- BaseCodeDomTreeGenerator.cs
- RulePatternOps.cs
- FontWeights.cs
- LeafCellTreeNode.cs
- ListBoxAutomationPeer.cs
- safex509handles.cs
- PageSetupDialog.cs
- SqlTransaction.cs
- GridViewRow.cs
- HexParser.cs
- ZipIOLocalFileBlock.cs
- ParameterBuilder.cs
- XmlRootAttribute.cs
- DataStreamFromComStream.cs
- ScrollBar.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- DataBinder.cs
- HtmlInputReset.cs