Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- RawAppCommandInputReport.cs
- TextElementCollection.cs
- PlanCompiler.cs
- Overlapped.cs
- CodeDirectionExpression.cs
- CookielessHelper.cs
- GridViewPageEventArgs.cs
- Configuration.cs
- QueryCacheKey.cs
- Listbox.cs
- unsafeIndexingFilterStream.cs
- DataGridViewTopLeftHeaderCell.cs
- LockCookie.cs
- PageSetupDialog.cs
- ExecutionEngineException.cs
- TextTabProperties.cs
- EnterpriseServicesHelper.cs
- JournalNavigationScope.cs
- RtfToXamlLexer.cs
- BaseCodeDomTreeGenerator.cs
- EdgeModeValidation.cs
- ParagraphResult.cs
- PropertySegmentSerializer.cs
- InternalTypeHelper.cs
- Panel.cs
- AbandonedMutexException.cs
- StrongName.cs
- AssemblyHash.cs
- DataGridHeaderBorder.cs
- GridViewColumnHeaderAutomationPeer.cs
- MenuItem.cs
- SessionStateItemCollection.cs
- PEFileReader.cs
- BitmapImage.cs
- RowBinding.cs
- ISCIIEncoding.cs
- Soap.cs
- DispatcherTimer.cs
- LocatorPart.cs
- TextServicesCompartmentContext.cs
- JpegBitmapDecoder.cs
- OrderingExpression.cs
- DbCommandTree.cs
- GradientStop.cs
- Stopwatch.cs
- FixedSOMGroup.cs
- ObjectCacheHost.cs
- SubMenuStyleCollectionEditor.cs
- CellParagraph.cs
- CompositeFontInfo.cs
- InstanceLockTracking.cs
- JsonXmlDataContract.cs
- RuleValidation.cs
- FormView.cs
- __ConsoleStream.cs
- CompositeControl.cs
- LinqDataSource.cs
- ComboBoxDesigner.cs
- CompositeDesignerAccessibleObject.cs
- ProfileGroupSettings.cs
- ToolStripCollectionEditor.cs
- SerializationStore.cs
- SizeChangedEventArgs.cs
- SourceFileBuildProvider.cs
- SupportedAddressingMode.cs
- FixedPageAutomationPeer.cs
- Stream.cs
- InstanceView.cs
- RectAnimationBase.cs
- TextBox.cs
- NeutralResourcesLanguageAttribute.cs
- ListViewInsertEventArgs.cs
- EventArgs.cs
- SimpleColumnProvider.cs
- SkinBuilder.cs
- UpdatePanelControlTrigger.cs
- XmlSignificantWhitespace.cs
- SettingsSavedEventArgs.cs
- NGCUIElementCollectionSerializerAsync.cs
- COM2PropertyDescriptor.cs
- RulePatternOps.cs
- ViewEventArgs.cs
- BooleanStorage.cs
- VolatileEnlistmentState.cs
- CharEntityEncoderFallback.cs
- ImageField.cs
- OracleTransaction.cs
- MimeMapping.cs
- DesignerActionUI.cs
- Knowncolors.cs
- ColumnResizeAdorner.cs
- CaseInsensitiveOrdinalStringComparer.cs
- QEncodedStream.cs
- ValidationSummary.cs
- Wizard.cs
- LicenseManager.cs
- ArcSegment.cs
- TextParaLineResult.cs
- ScriptControlDescriptor.cs
- NodeLabelEditEvent.cs