Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- RTLAwareMessageBox.cs
- TextParagraph.cs
- XmlSchemaCollection.cs
- ToolStripSeparator.cs
- NegotiateStream.cs
- LambdaCompiler.Statements.cs
- CodeExpressionStatement.cs
- RowVisual.cs
- LocalBuilder.cs
- SecUtil.cs
- clipboard.cs
- NamespaceCollection.cs
- SqlDataAdapter.cs
- WorkflowRuntimeSection.cs
- GridView.cs
- NameValuePair.cs
- DataMemberFieldConverter.cs
- PerformanceCounterPermissionEntry.cs
- FormViewDeletedEventArgs.cs
- OdbcUtils.cs
- String.cs
- NameNode.cs
- DataServiceQueryException.cs
- Slider.cs
- FileChangesMonitor.cs
- DecoderBestFitFallback.cs
- PriorityBinding.cs
- CodeDomDesignerLoader.cs
- ModuleElement.cs
- SSmlParser.cs
- IMembershipProvider.cs
- SqlRecordBuffer.cs
- UntypedNullExpression.cs
- AsymmetricSecurityProtocolFactory.cs
- SqlExpressionNullability.cs
- PropagatorResult.cs
- BoundPropertyEntry.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- ToolStripItemImageRenderEventArgs.cs
- ShaderEffect.cs
- OdbcDataReader.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- XmlMembersMapping.cs
- ObjectItemCachedAssemblyLoader.cs
- SqlHelper.cs
- FileDialogCustomPlace.cs
- ObjectKeyFrameCollection.cs
- ViewStateModeByIdAttribute.cs
- ToolStripSeparator.cs
- assertwrapper.cs
- DesignUtil.cs
- PrefixQName.cs
- FunctionImportMapping.cs
- RelationshipType.cs
- CallbackValidatorAttribute.cs
- ReceiveSecurityHeaderElementManager.cs
- ComAdminWrapper.cs
- DataBoundLiteralControl.cs
- FileDetails.cs
- ThemeableAttribute.cs
- DelegatingTypeDescriptionProvider.cs
- MenuItem.cs
- Switch.cs
- MulticastDelegate.cs
- TypeSystem.cs
- SiteIdentityPermission.cs
- HttpServerUtilityWrapper.cs
- XhtmlTextWriter.cs
- SQLInt16.cs
- HttpMethodConstraint.cs
- TextModifierScope.cs
- WebPartDescriptionCollection.cs
- BuildManagerHost.cs
- EntityClassGenerator.cs
- RangeValuePatternIdentifiers.cs
- ProcessHost.cs
- RtfToXamlLexer.cs
- SqlDataSourceConfigureFilterForm.cs
- Inflater.cs
- SeekStoryboard.cs
- filewebrequest.cs
- FormViewDeleteEventArgs.cs
- Geometry3D.cs
- ModelItemCollectionImpl.cs
- WebPartZoneCollection.cs
- ModelPerspective.cs
- ManagementScope.cs
- ImageMap.cs
- MembershipUser.cs
- ContextBase.cs
- EllipseGeometry.cs
- ListView.cs
- TransactionTable.cs
- XPathNodeIterator.cs
- SqlClientWrapperSmiStream.cs
- EmissiveMaterial.cs
- ActivitiesCollection.cs
- BindingGroup.cs
- SQLInt32.cs
- BuildResult.cs