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
- AutoSizeComboBox.cs
- QilExpression.cs
- RowCache.cs
- ResXDataNode.cs
- TextTrailingWordEllipsis.cs
- InternalBufferManager.cs
- ObjectItemAssemblyLoader.cs
- CompositeDataBoundControl.cs
- XmlCharType.cs
- SystemIPGlobalStatistics.cs
- CqlGenerator.cs
- FigureParaClient.cs
- UniformGrid.cs
- RegisteredScript.cs
- precedingsibling.cs
- SqlAliaser.cs
- MobileListItem.cs
- ComboBox.cs
- ActiveXContainer.cs
- GenericEnumConverter.cs
- HttpChannelHelper.cs
- StylusPointProperty.cs
- JsonStringDataContract.cs
- OdbcDataReader.cs
- Rijndael.cs
- WebBrowserPermission.cs
- MemberPathMap.cs
- FormViewPageEventArgs.cs
- ElementAtQueryOperator.cs
- ValueQuery.cs
- RuntimeIdentifierPropertyAttribute.cs
- _IPv6Address.cs
- TextPointer.cs
- TimeSpanValidator.cs
- PerformanceCounter.cs
- InnerItemCollectionView.cs
- SelectionProviderWrapper.cs
- SimpleWebHandlerParser.cs
- Rectangle.cs
- TextInfo.cs
- AdCreatedEventArgs.cs
- DesignBindingPicker.cs
- ResXResourceSet.cs
- PackageRelationshipSelector.cs
- ChameleonKey.cs
- WSDualHttpSecurityElement.cs
- DictionarySurrogate.cs
- ServiceBehaviorElement.cs
- Baml2006KnownTypes.cs
- CodeTypeReferenceCollection.cs
- HtmlControl.cs
- MessageFilterException.cs
- ConfigurationStrings.cs
- ErrorTolerantObjectWriter.cs
- BlurEffect.cs
- XmlUtil.cs
- Tile.cs
- AttributeTableBuilder.cs
- SettingsProperty.cs
- ScriptServiceAttribute.cs
- SQLBinaryStorage.cs
- TargetInvocationException.cs
- UpdatePanel.cs
- DbDataSourceEnumerator.cs
- HttpRequestBase.cs
- SplitterPanel.cs
- SystemIPGlobalStatistics.cs
- WebPartAddingEventArgs.cs
- SystemGatewayIPAddressInformation.cs
- LinkTarget.cs
- ProviderBase.cs
- WebPartAddingEventArgs.cs
- Helpers.cs
- GraphicsState.cs
- DataReaderContainer.cs
- ObjectView.cs
- CompModSwitches.cs
- TimeSpanValidator.cs
- StreamGeometry.cs
- ResizeGrip.cs
- Animatable.cs
- ProtocolsConfiguration.cs
- ScriptMethodAttribute.cs
- DataTemplate.cs
- JsonReader.cs
- StringUtil.cs
- FormsAuthentication.cs
- TableSectionStyle.cs
- Block.cs
- PipeStream.cs
- BitmapFrameDecode.cs
- ImmutablePropertyDescriptorGridEntry.cs
- SQLSingleStorage.cs
- BufferedStream.cs
- BufferedWebEventProvider.cs
- ResourceExpressionBuilder.cs
- CustomCredentialPolicy.cs
- DataRecord.cs
- CommentAction.cs
- tabpagecollectioneditor.cs