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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DBAsyncResult.cs
- DataSourceSelectArguments.cs
- TransactionManager.cs
- DBCSCodePageEncoding.cs
- OleDbRowUpdatedEvent.cs
- SqlExpressionNullability.cs
- ButtonBase.cs
- FieldMetadata.cs
- ImportDesigner.xaml.cs
- MenuItemBindingCollection.cs
- SequenceRange.cs
- KeyEventArgs.cs
- ResourceReferenceExpression.cs
- XmlSchemaSimpleTypeUnion.cs
- ButtonStandardAdapter.cs
- XmlArrayAttribute.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- SettingsProviderCollection.cs
- BamlReader.cs
- BaseDataListComponentEditor.cs
- GradientStopCollection.cs
- ObjectStateFormatter.cs
- UpdateTranslator.cs
- RepeaterItem.cs
- SoapAttributeAttribute.cs
- JournalEntryStack.cs
- securestring.cs
- TemplateContentLoader.cs
- ScriptControl.cs
- EmbeddedMailObject.cs
- RelationalExpressions.cs
- ComponentCodeDomSerializer.cs
- ItemsControl.cs
- NonceCache.cs
- SHA256.cs
- CommandManager.cs
- XmlSchemaAppInfo.cs
- Page.cs
- ExceptionUtil.cs
- SemanticBasicElement.cs
- ComplusTypeValidator.cs
- DesignerCatalogPartChrome.cs
- HtmlShim.cs
- DesignerSerializationOptionsAttribute.cs
- BuildResultCache.cs
- LinqDataSourceView.cs
- X509PeerCertificateAuthenticationElement.cs
- UnsafeNativeMethods.cs
- IndexedGlyphRun.cs
- ManagedCodeMarkers.cs
- GrammarBuilderPhrase.cs
- MatrixTransform3D.cs
- ClaimTypeRequirement.cs
- GACIdentityPermission.cs
- Convert.cs
- RelationalExpressions.cs
- AuthorizationRule.cs
- ViewEvent.cs
- Int32.cs
- X509ChainPolicy.cs
- _ChunkParse.cs
- TextElement.cs
- WebBaseEventKeyComparer.cs
- FontStretchConverter.cs
- PreProcessInputEventArgs.cs
- DatatypeImplementation.cs
- ListComponentEditor.cs
- FontStretches.cs
- XhtmlMobileTextWriter.cs
- RoutedCommand.cs
- MDIClient.cs
- ViewBox.cs
- Environment.cs
- InfiniteIntConverter.cs
- FlowDocumentScrollViewer.cs
- IsolatedStorage.cs
- ZipIOCentralDirectoryBlock.cs
- LiteralText.cs
- Int32AnimationUsingKeyFrames.cs
- URI.cs
- DateTimeValueSerializerContext.cs
- AppliedDeviceFiltersEditor.cs
- KeyboardEventArgs.cs
- FrameAutomationPeer.cs
- PerformanceCounterPermissionEntryCollection.cs
- BooleanFacetDescriptionElement.cs
- WindowsSlider.cs
- DirtyTextRange.cs
- ProcessRequestArgs.cs
- UniqueEventHelper.cs
- SelectionEditor.cs
- CodeDelegateCreateExpression.cs
- MetadataItemCollectionFactory.cs
- StringResourceManager.cs
- TextMarkerSource.cs
- BindingMAnagerBase.cs
- WebPartConnectVerb.cs
- SqlDataSource.cs
- DoubleAnimationUsingKeyFrames.cs
- ButtonChrome.cs