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
- OleDbCommandBuilder.cs
- BamlLocalizer.cs
- WebBrowserEvent.cs
- UnauthorizedAccessException.cs
- BitmapEncoder.cs
- Trace.cs
- unsafeIndexingFilterStream.cs
- SubpageParagraph.cs
- CustomMenuItemCollection.cs
- ClientTarget.cs
- StringFormat.cs
- ChangeToolStripParentVerb.cs
- OneOf.cs
- SocketPermission.cs
- MenuItem.cs
- TextRange.cs
- DiscreteKeyFrames.cs
- JoinCqlBlock.cs
- ListBoxItemWrapperAutomationPeer.cs
- SoapAttributeAttribute.cs
- SendKeys.cs
- WaitHandleCannotBeOpenedException.cs
- BreakSafeBase.cs
- Update.cs
- XmlWrappingWriter.cs
- FontCollection.cs
- AuthStoreRoleProvider.cs
- DetailsViewRow.cs
- TextSelectionProcessor.cs
- StylusButtonEventArgs.cs
- Stylus.cs
- GradientBrush.cs
- WebEventCodes.cs
- PathFigureCollection.cs
- UrlAuthorizationModule.cs
- OpenTypeCommon.cs
- BindStream.cs
- ToolboxComponentsCreatingEventArgs.cs
- SQLInt64.cs
- WebBodyFormatMessageProperty.cs
- CurrencyManager.cs
- ZipPackage.cs
- Serializer.cs
- cryptoapiTransform.cs
- QueryCacheKey.cs
- PropertyIdentifier.cs
- ExeConfigurationFileMap.cs
- StrongTypingException.cs
- _SslSessionsCache.cs
- Marshal.cs
- ContextStack.cs
- ObservableCollection.cs
- AncillaryOps.cs
- TraceHandlerErrorFormatter.cs
- BamlTreeMap.cs
- HistoryEventArgs.cs
- BCryptSafeHandles.cs
- OracleTimeSpan.cs
- WebPartZoneCollection.cs
- KeyTimeConverter.cs
- FlowDocument.cs
- PriorityBinding.cs
- XPathConvert.cs
- CompModSwitches.cs
- _AutoWebProxyScriptEngine.cs
- SQLInt64.cs
- WebPartEditorOkVerb.cs
- AsyncPostBackErrorEventArgs.cs
- ProfileSection.cs
- KnownTypesProvider.cs
- CustomTypeDescriptor.cs
- XmlQualifiedName.cs
- RemoteHelper.cs
- cache.cs
- RequestBringIntoViewEventArgs.cs
- QueryOutputWriter.cs
- FontDriver.cs
- DoubleAnimation.cs
- handlecollector.cs
- SortExpressionBuilder.cs
- TemplateBindingExpression.cs
- LayoutTable.cs
- DesignerLoader.cs
- SHA256.cs
- EndpointDesigner.cs
- DesignerCategoryAttribute.cs
- Missing.cs
- ContentOperations.cs
- QueryOperator.cs
- CaseStatement.cs
- FamilyTypefaceCollection.cs
- WebConfigurationManager.cs
- SafeLibraryHandle.cs
- SafeSecurityHelper.cs
- SqlUtil.cs
- entityreference_tresulttype.cs
- ConfigXmlDocument.cs
- uribuilder.cs
- TypeUtils.cs
- PagesSection.cs