Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Win32.cs
- NativeBuffer.cs
- Panel.cs
- TreeViewImageKeyConverter.cs
- CombinedGeometry.cs
- CacheEntry.cs
- MemberPath.cs
- PeerInvitationResponse.cs
- HealthMonitoringSection.cs
- SingleTagSectionHandler.cs
- AsymmetricAlgorithm.cs
- FileIOPermission.cs
- EntityViewGenerationAttribute.cs
- CodeDomConfigurationHandler.cs
- PathGradientBrush.cs
- ClaimSet.cs
- _NegotiateClient.cs
- PageCatalogPart.cs
- GradientSpreadMethodValidation.cs
- MSAAEventDispatcher.cs
- TypeSystem.cs
- PropertyValueChangedEvent.cs
- DbParameterHelper.cs
- AutomationIdentifierGuids.cs
- RawUIStateInputReport.cs
- BaseConfigurationRecord.cs
- DataGridCellClipboardEventArgs.cs
- ToolStripScrollButton.cs
- GridViewCellAutomationPeer.cs
- CodeTypeParameterCollection.cs
- Symbol.cs
- XmlSchemaDatatype.cs
- SerializerProvider.cs
- RequestNavigateEventArgs.cs
- BamlLocalizationDictionary.cs
- regiisutil.cs
- EntityDataSourceUtil.cs
- InternalDuplexChannelFactory.cs
- COAUTHIDENTITY.cs
- SafeNativeMethodsMilCoreApi.cs
- TimelineGroup.cs
- ToolStrip.cs
- SpeakCompletedEventArgs.cs
- InvalidFilterCriteriaException.cs
- DataErrorValidationRule.cs
- PKCS1MaskGenerationMethod.cs
- SessionEndedEventArgs.cs
- IgnorePropertiesAttribute.cs
- SafeUserTokenHandle.cs
- Executor.cs
- InfoCardTrace.cs
- DependencyObjectProvider.cs
- SQLStringStorage.cs
- TraceSection.cs
- CmsUtils.cs
- XPathBuilder.cs
- SqlDataSource.cs
- StateMachine.cs
- LookupNode.cs
- CustomWebEventKey.cs
- Deflater.cs
- DragCompletedEventArgs.cs
- CmsUtils.cs
- JsonReaderDelegator.cs
- AuthenticationServiceManager.cs
- DBSqlParserColumnCollection.cs
- NavigatorInput.cs
- NavigateEvent.cs
- Configuration.cs
- ConfigXmlWhitespace.cs
- ConstrainedDataObject.cs
- Util.cs
- IisTraceListener.cs
- DynamicRouteExpression.cs
- FileIOPermission.cs
- TextTreeRootTextBlock.cs
- ImplicitInputBrush.cs
- SelectionEditor.cs
- TokenBasedSetEnumerator.cs
- CalendarDataBindingHandler.cs
- CheckStoreFileValidityRequest.cs
- TransactionTraceIdentifier.cs
- Vector3DAnimationBase.cs
- EnumUnknown.cs
- StackOverflowException.cs
- Listbox.cs
- DataGridViewTextBoxColumn.cs
- HttpGetServerProtocol.cs
- FontClient.cs
- ResourceReader.cs
- WebBrowserHelper.cs
- FrameworkPropertyMetadata.cs
- Thickness.cs
- WorkItem.cs
- Nullable.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- CommandHelpers.cs
- sqlser.cs
- SrgsDocumentParser.cs
- ControlValuePropertyAttribute.cs