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
- PeerInvitationResponse.cs
- BinaryObjectWriter.cs
- ApplicationFileParser.cs
- CompiledAction.cs
- HttpEncoder.cs
- DefaultEventAttribute.cs
- ModuleBuilder.cs
- DurableInstanceProvider.cs
- FixedSOMElement.cs
- MissingMemberException.cs
- RowSpanVector.cs
- ImageFormat.cs
- SqlFileStream.cs
- PlacementWorkspace.cs
- CompilerError.cs
- ProfileService.cs
- _ConnectionGroup.cs
- PerformanceCounterLib.cs
- TextDpi.cs
- SafeCryptoKeyHandle.cs
- TypedTableBaseExtensions.cs
- LogRecordSequence.cs
- COM2Properties.cs
- SiteMapProvider.cs
- HttpWrapper.cs
- MenuItemBinding.cs
- FullTextBreakpoint.cs
- WindowManager.cs
- ObjectParameter.cs
- StandardToolWindows.cs
- PreProcessor.cs
- TaskResultSetter.cs
- InstanceOwnerQueryResult.cs
- Rfc2898DeriveBytes.cs
- _LocalDataStore.cs
- RemotingAttributes.cs
- MenuBase.cs
- Object.cs
- ScriptDescriptor.cs
- WindowClosedEventArgs.cs
- SessionStateContainer.cs
- TranslateTransform3D.cs
- TextTreeTextNode.cs
- MessageBox.cs
- XPathSelfQuery.cs
- InvokeBinder.cs
- SqlBuffer.cs
- SamlEvidence.cs
- FileRegion.cs
- ControlCommandSet.cs
- CodeTypeConstructor.cs
- RequestSecurityToken.cs
- WorkflowWebHostingModule.cs
- DesignTimeTemplateParser.cs
- ThrowHelper.cs
- TrackingStringDictionary.cs
- Canvas.cs
- BaseTemplateCodeDomTreeGenerator.cs
- PerspectiveCamera.cs
- DesignerEventService.cs
- ConstructorExpr.cs
- DragDrop.cs
- ApplicationTrust.cs
- MarkupCompilePass2.cs
- Win32SafeHandles.cs
- IPEndPointCollection.cs
- MessageBuilder.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- XhtmlConformanceSection.cs
- EntityStoreSchemaFilterEntry.cs
- DataGridViewCellStyleConverter.cs
- TlsnegoTokenProvider.cs
- SmiRecordBuffer.cs
- SystemInfo.cs
- DataSourceHelper.cs
- ProfileProvider.cs
- WebConfigurationHost.cs
- PlatformCulture.cs
- TypeInitializationException.cs
- SimpleMailWebEventProvider.cs
- ViewStateChangedEventArgs.cs
- XPathSelfQuery.cs
- LogLogRecordHeader.cs
- RemotingConfigParser.cs
- WebHttpSecurityModeHelper.cs
- QueryCacheKey.cs
- Underline.cs
- KeyValueConfigurationElement.cs
- SqlReorderer.cs
- HttpInputStream.cs
- TcpTransportElement.cs
- UnmanagedMemoryStream.cs
- MessageBodyMemberAttribute.cs
- QueryAccessibilityHelpEvent.cs
- DataTableReaderListener.cs
- ObjectDataSource.cs
- PocoPropertyAccessorStrategy.cs
- BinaryUtilClasses.cs
- HttpStaticObjectsCollectionBase.cs
- TcpConnectionPool.cs