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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Timer.cs
- DateTimeValueSerializer.cs
- cryptoapiTransform.cs
- SafeEventLogWriteHandle.cs
- ValueSerializer.cs
- AsnEncodedData.cs
- JulianCalendar.cs
- ApplicationProxyInternal.cs
- Vector3dCollection.cs
- Authorization.cs
- SQLInt64Storage.cs
- VisualStyleTypesAndProperties.cs
- LinearGradientBrush.cs
- ConversionValidationRule.cs
- VisualStyleRenderer.cs
- Executor.cs
- GenerateTemporaryTargetAssembly.cs
- TextLineResult.cs
- FixedSOMFixedBlock.cs
- InternalCache.cs
- BoundsDrawingContextWalker.cs
- PolicyValidator.cs
- xmlformatgeneratorstatics.cs
- ButtonPopupAdapter.cs
- DataControlButton.cs
- AdRotatorDesigner.cs
- ColorMatrix.cs
- CachedTypeface.cs
- ParameterCollection.cs
- BitStream.cs
- RowUpdatedEventArgs.cs
- ControlEvent.cs
- BitmapEffectGeneralTransform.cs
- DurationConverter.cs
- ListDictionaryInternal.cs
- ImpersonateTokenRef.cs
- RemoveStoryboard.cs
- NamedObject.cs
- KeyGestureValueSerializer.cs
- CoTaskMemHandle.cs
- BrowserInteropHelper.cs
- TableLayoutRowStyleCollection.cs
- CellNormalizer.cs
- Menu.cs
- Debug.cs
- GZipObjectSerializer.cs
- jithelpers.cs
- EUCJPEncoding.cs
- ViewBox.cs
- ResourceAssociationType.cs
- DbBuffer.cs
- DBNull.cs
- NativeMethods.cs
- CipherData.cs
- HashSet.cs
- Application.cs
- StackOverflowException.cs
- WebResourceAttribute.cs
- NameValueCache.cs
- ImageBrush.cs
- CookieHandler.cs
- UriScheme.cs
- QueryStringConverter.cs
- ResXBuildProvider.cs
- InfoCard.cs
- ValidatedControlConverter.cs
- SqlBuffer.cs
- ApplyHostConfigurationBehavior.cs
- MarkupObject.cs
- WindowsTab.cs
- MemoryFailPoint.cs
- ToolStripDropDown.cs
- ServiceMoniker.cs
- FixedLineResult.cs
- DocumentPage.cs
- CalculatedColumn.cs
- ToolStripPanelRow.cs
- SoapMessage.cs
- SizeConverter.cs
- HashCodeCombiner.cs
- ExceptionHandlersDesigner.cs
- ScrollViewerAutomationPeer.cs
- ToolStripControlHost.cs
- CompatibleComparer.cs
- VectorCollection.cs
- MetadataConversionError.cs
- Latin1Encoding.cs
- DetailsViewRow.cs
- OdbcErrorCollection.cs
- DesignTimeDataBinding.cs
- EventLogTraceListener.cs
- DiscoveryClientChannelFactory.cs
- WhitespaceRuleReader.cs
- Button.cs
- SqlDelegatedTransaction.cs
- OleDbRowUpdatingEvent.cs
- TableLayoutSettings.cs
- MergeFailedEvent.cs
- ProcessStartInfo.cs
- AtomContentProperty.cs