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
- EntitySetDataBindingList.cs
- Subset.cs
- MemoryFailPoint.cs
- ExceptionAggregator.cs
- Ipv6Element.cs
- OutputScope.cs
- WhereaboutsReader.cs
- LabelEditEvent.cs
- ProgressBarBrushConverter.cs
- ClientScriptManager.cs
- FontWeight.cs
- SecurityKeyType.cs
- UdpAnnouncementEndpoint.cs
- MultipartContentParser.cs
- CharacterBufferReference.cs
- SqlProcedureAttribute.cs
- SiteMapNodeCollection.cs
- ObjectViewQueryResultData.cs
- XmlAttributeAttribute.cs
- ConfigurationStrings.cs
- EpmContentDeSerializerBase.cs
- UnsafeNativeMethods.cs
- AspNetCacheProfileAttribute.cs
- XsltOutput.cs
- TemplatePartAttribute.cs
- MessageBox.cs
- PageCatalogPart.cs
- HelpInfo.cs
- SerialPort.cs
- WindowHelperService.cs
- CurrentChangingEventManager.cs
- CheckBoxDesigner.cs
- EventPrivateKey.cs
- DoubleCollection.cs
- ADMembershipUser.cs
- Int32Rect.cs
- MenuItemBindingCollection.cs
- RuntimeConfig.cs
- DecoderNLS.cs
- HMACMD5.cs
- MarshalDirectiveException.cs
- ApplicationSecurityInfo.cs
- TextSelectionHelper.cs
- _LazyAsyncResult.cs
- DefaultEventAttribute.cs
- SecurityDescriptor.cs
- Configuration.cs
- DataControlImageButton.cs
- QueryCursorEventArgs.cs
- DoubleConverter.cs
- SchemaInfo.cs
- DataTemplate.cs
- NotImplementedException.cs
- TableLayoutCellPaintEventArgs.cs
- mediaeventargs.cs
- Unit.cs
- PageContent.cs
- Internal.cs
- DataSetUtil.cs
- XmlSchemaExporter.cs
- ResourcePool.cs
- FormClosedEvent.cs
- TreeChangeInfo.cs
- MarkupCompilePass1.cs
- DynamicPropertyHolder.cs
- OneOfElement.cs
- Publisher.cs
- AbsoluteQuery.cs
- GeometryValueSerializer.cs
- GcHandle.cs
- GraphicsPath.cs
- EntitySqlException.cs
- TokenBasedSet.cs
- VirtualDirectoryMappingCollection.cs
- HttpResponseHeader.cs
- UriSection.cs
- EnumerableRowCollectionExtensions.cs
- GroupItemAutomationPeer.cs
- DocumentPageTextView.cs
- DataFormats.cs
- BufferModeSettings.cs
- SecurityTokenException.cs
- ConstraintCollection.cs
- CompilerGeneratedAttribute.cs
- DataColumn.cs
- Debug.cs
- TransformedBitmap.cs
- SafeFileMappingHandle.cs
- EditorZone.cs
- TemplateInstanceAttribute.cs
- RegexReplacement.cs
- StringSorter.cs
- EntityDataSourceDesignerHelper.cs
- Error.cs
- SmiGettersStream.cs
- XamlClipboardData.cs
- AttributedMetaModel.cs
- prompt.cs
- SQLString.cs
- RecognitionEventArgs.cs