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
- WorkflowExecutor.cs
- ListViewItem.cs
- _UriTypeConverter.cs
- AssemblyCollection.cs
- MeasureItemEvent.cs
- XmlILConstructAnalyzer.cs
- ColorConvertedBitmap.cs
- IdnMapping.cs
- ResourcePool.cs
- NameTable.cs
- FunctionUpdateCommand.cs
- Journaling.cs
- LinkUtilities.cs
- RotateTransform3D.cs
- PathGeometry.cs
- TableParagraph.cs
- SqlUnionizer.cs
- Brush.cs
- ColorInterpolationModeValidation.cs
- ToolBarPanel.cs
- UserControlBuildProvider.cs
- ToolStripTextBox.cs
- TimeZone.cs
- ElementProxy.cs
- HwndPanningFeedback.cs
- SignedXmlDebugLog.cs
- DataServiceStreamResponse.cs
- SortedSet.cs
- OutputCacheProfile.cs
- WebMessageEncodingBindingElement.cs
- PeerNameResolver.cs
- TagPrefixAttribute.cs
- TreeNodeCollection.cs
- SymLanguageVendor.cs
- InstanceValue.cs
- ParagraphVisual.cs
- FileController.cs
- ResourceKey.cs
- FilterElement.cs
- WinFormsUtils.cs
- ExtensionDataReader.cs
- TcpTransportManager.cs
- EdmItemCollection.OcAssemblyCache.cs
- CdpEqualityComparer.cs
- InstanceDataCollection.cs
- TileModeValidation.cs
- DBSchemaRow.cs
- NavigationService.cs
- WebPartCancelEventArgs.cs
- PartitionedDataSource.cs
- DivideByZeroException.cs
- AddingNewEventArgs.cs
- CryptoHandle.cs
- X509CertificateCollection.cs
- ResourceType.cs
- DataBoundControl.cs
- cache.cs
- OutOfProcStateClientManager.cs
- XmlSerializerFactory.cs
- OptimalTextSource.cs
- EdmScalarPropertyAttribute.cs
- TextElementEditingBehaviorAttribute.cs
- CustomCategoryAttribute.cs
- WebPartZone.cs
- CLSCompliantAttribute.cs
- PenThreadWorker.cs
- ListMarkerSourceInfo.cs
- XmlSchemaComplexContentRestriction.cs
- IISMapPath.cs
- InputLanguageCollection.cs
- EventHandlersStore.cs
- NamespaceCollection.cs
- CodeSnippetStatement.cs
- DataGridTextBoxColumn.cs
- SecurityPolicySection.cs
- DataGridTextBox.cs
- CellPartitioner.cs
- TcpStreams.cs
- ExceptionHandler.cs
- FlowLayout.cs
- InkCanvasSelectionAdorner.cs
- ColorTransformHelper.cs
- PeoplePickerWrapper.cs
- IpcChannelHelper.cs
- XmlValueConverter.cs
- CounterCreationData.cs
- RefreshEventArgs.cs
- LabelExpression.cs
- ExpandableObjectConverter.cs
- SystemEvents.cs
- SessionStateContainer.cs
- CompatibleComparer.cs
- ConsoleCancelEventArgs.cs
- LinqDataSourceContextData.cs
- AddInSegmentDirectoryNotFoundException.cs
- ConfigurationException.cs
- DrawingBrush.cs
- QueryResponse.cs
- Pkcs7Signer.cs
- ConnectivityStatus.cs