Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // 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
- LoadWorkflowAsyncResult.cs
- XmlSchemaCompilationSettings.cs
- GetPageCompletedEventArgs.cs
- GridViewCancelEditEventArgs.cs
- SettingsSection.cs
- ScrollProviderWrapper.cs
- GcHandle.cs
- GrammarBuilder.cs
- FederatedMessageSecurityOverHttpElement.cs
- HostProtectionException.cs
- SinglePageViewer.cs
- TreeIterator.cs
- NavigatorOutput.cs
- MenuStrip.cs
- XdrBuilder.cs
- GridViewColumnHeaderAutomationPeer.cs
- WebPartEditorOkVerb.cs
- _OSSOCK.cs
- DefaultAuthorizationContext.cs
- DynamicHyperLink.cs
- DataGridViewCellStyleBuilderDialog.cs
- ProtocolImporter.cs
- UIPermission.cs
- AlternateView.cs
- TextDocumentView.cs
- PingReply.cs
- DataGridViewRowHeaderCell.cs
- ImpersonateTokenRef.cs
- RowUpdatedEventArgs.cs
- ArraySubsetEnumerator.cs
- ActivityDesignerLayoutSerializers.cs
- ImplicitInputBrush.cs
- ISAPIWorkerRequest.cs
- InputProcessorProfilesLoader.cs
- CompiledWorkflowDefinitionContext.cs
- HandleCollector.cs
- AnnouncementEndpoint.cs
- WebPartConnectionsCancelEventArgs.cs
- SafeMemoryMappedFileHandle.cs
- HtmlButton.cs
- SoapInteropTypes.cs
- ResourceManagerWrapper.cs
- mactripleDES.cs
- EventBuilder.cs
- EntityDataSourceQueryBuilder.cs
- NoneExcludedImageIndexConverter.cs
- SubclassTypeValidator.cs
- RawAppCommandInputReport.cs
- MulticastOption.cs
- System.Data.OracleClient_BID.cs
- FileDialogCustomPlacesCollection.cs
- AbstractExpressions.cs
- DbXmlEnabledProviderManifest.cs
- sqlinternaltransaction.cs
- CurrencyManager.cs
- MemberProjectedSlot.cs
- ContainerTracking.cs
- ServiceHostFactory.cs
- OpCopier.cs
- KeyboardDevice.cs
- StaticResourceExtension.cs
- TraceInternal.cs
- SignedXml.cs
- DataProtection.cs
- LinqDataSourceSelectEventArgs.cs
- GcSettings.cs
- HtmlInputFile.cs
- SettingsSection.cs
- CollectionViewGroup.cs
- QueryExpression.cs
- DataBinder.cs
- BrowserCapabilitiesCompiler.cs
- ParameterReplacerVisitor.cs
- AuditLevel.cs
- CacheHelper.cs
- GridViewRowCollection.cs
- CultureNotFoundException.cs
- ProviderBase.cs
- WmpBitmapDecoder.cs
- DataFieldCollectionEditor.cs
- DrawingContextWalker.cs
- TextEditorTables.cs
- Misc.cs
- BulletedListEventArgs.cs
- DatagridviewDisplayedBandsData.cs
- DeviceContexts.cs
- DataView.cs
- DataGridRowsPresenter.cs
- ComplexTypeEmitter.cs
- SmtpReplyReaderFactory.cs
- DesignTimeXamlWriter.cs
- DataObjectPastingEventArgs.cs
- ConfigXmlText.cs
- TextEndOfSegment.cs
- Single.cs
- MaterialCollection.cs
- SizeF.cs
- TagPrefixCollection.cs
- Lasso.cs
- ServiceObjectContainer.cs