Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- BrowserCapabilitiesCodeGenerator.cs
- CellQuery.cs
- ParserContext.cs
- WebUtility.cs
- CatalogZoneDesigner.cs
- ContextMenuStripGroupCollection.cs
- XsdDataContractImporter.cs
- PointIndependentAnimationStorage.cs
- MediaTimeline.cs
- ZoneMembershipCondition.cs
- DisplayNameAttribute.cs
- StrokeIntersection.cs
- Util.cs
- TextSearch.cs
- LambdaCompiler.Binary.cs
- StylusEventArgs.cs
- CompositeClientFormatter.cs
- FrameworkRichTextComposition.cs
- XMLSyntaxException.cs
- ComponentSerializationService.cs
- HtmlInputRadioButton.cs
- HttpCacheParams.cs
- EventMappingSettings.cs
- BitVec.cs
- ReferenceConverter.cs
- sqlser.cs
- EntityContainerEmitter.cs
- ProxyAssemblyNotLoadedException.cs
- Label.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- StringArrayEditor.cs
- TypeElement.cs
- IBuiltInEvidence.cs
- PreservationFileWriter.cs
- DynamicQueryableWrapper.cs
- TextDecoration.cs
- processwaithandle.cs
- SafeThreadHandle.cs
- XmlSerializerVersionAttribute.cs
- Selection.cs
- ServiceBusyException.cs
- AttachedPropertiesService.cs
- HostProtectionPermission.cs
- EndOfStreamException.cs
- XmlSerializationReader.cs
- SqlTriggerContext.cs
- TransactionsSectionGroup.cs
- Sql8ExpressionRewriter.cs
- TraceContextEventArgs.cs
- ModifiableIteratorCollection.cs
- DateTimeOffsetStorage.cs
- Bezier.cs
- EarlyBoundInfo.cs
- PagePropertiesChangingEventArgs.cs
- WebPartChrome.cs
- XmlHelper.cs
- UserUseLicenseDictionaryLoader.cs
- HtmlTitle.cs
- Misc.cs
- LogReservationCollection.cs
- TypedDatasetGenerator.cs
- StackSpiller.Generated.cs
- RegexGroup.cs
- HuffmanTree.cs
- ResourceCodeDomSerializer.cs
- CodeDirectoryCompiler.cs
- Rfc4050KeyFormatter.cs
- ClientViaElement.cs
- CustomErrorCollection.cs
- AxHost.cs
- GenericParameterDataContract.cs
- ProcessModule.cs
- WindowsToolbarAsMenu.cs
- HTTPNotFoundHandler.cs
- ImageFormat.cs
- AggregateNode.cs
- NullableIntAverageAggregationOperator.cs
- TransportChannelListener.cs
- XmlDataLoader.cs
- UxThemeWrapper.cs
- TransformCollection.cs
- RecognitionResult.cs
- SecurityContext.cs
- ConfigurationSettings.cs
- CommandLibraryHelper.cs
- SHA1Cng.cs
- dbdatarecord.cs
- StickyNoteHelper.cs
- COSERVERINFO.cs
- Drawing.cs
- StandardBindingCollectionElement.cs
- Exception.cs
- PrimitiveCodeDomSerializer.cs
- HtmlElement.cs
- LicenseManager.cs
- RoutedEventConverter.cs
- ValidationRule.cs
- TableLayoutStyleCollection.cs
- EventWaitHandle.cs
- BaseCollection.cs