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
- DataSourceGroupCollection.cs
- objectresult_tresulttype.cs
- DatasetMethodGenerator.cs
- CatalogZoneBase.cs
- FileVersionInfo.cs
- ExpressionEditorAttribute.cs
- PointLightBase.cs
- ToolboxBitmapAttribute.cs
- WebReference.cs
- BCLDebug.cs
- ProcessModelInfo.cs
- ThemeDirectoryCompiler.cs
- EntityDataSourceWizardForm.cs
- _ContextAwareResult.cs
- DataGridRowDetailsEventArgs.cs
- tabpagecollectioneditor.cs
- ProtocolsSection.cs
- RuleConditionDialog.cs
- KeyInterop.cs
- SafeTimerHandle.cs
- DbProviderFactories.cs
- PhoneCall.cs
- CfgArc.cs
- ItemCheckedEvent.cs
- ClientFormsAuthenticationCredentials.cs
- Oci.cs
- Parser.cs
- List.cs
- _LocalDataStoreMgr.cs
- ProxyElement.cs
- EventArgs.cs
- WaitHandleCannotBeOpenedException.cs
- RepeatBehavior.cs
- RectAnimationBase.cs
- WebSysDisplayNameAttribute.cs
- XpsFontSubsetter.cs
- Trace.cs
- RequestSecurityTokenResponseCollection.cs
- SafeArrayTypeMismatchException.cs
- InsufficientMemoryException.cs
- SystemFonts.cs
- ProfileManager.cs
- OrElse.cs
- XmlWriter.cs
- RangeValidator.cs
- AnchoredBlock.cs
- Scene3D.cs
- TaskHelper.cs
- DataDocumentXPathNavigator.cs
- TraceLog.cs
- SelectionItemPattern.cs
- ShutDownListener.cs
- SqlWebEventProvider.cs
- EntitySet.cs
- DrawingImage.cs
- Cloud.cs
- SqlStatistics.cs
- IsolatedStorageFileStream.cs
- AgileSafeNativeMemoryHandle.cs
- StylusDevice.cs
- PhoneCallDesigner.cs
- UpdatePanelControlTrigger.cs
- UnmanagedHandle.cs
- EntitySetBase.cs
- EntityTransaction.cs
- FillBehavior.cs
- BatchStream.cs
- ButtonChrome.cs
- xsdvalidator.cs
- CompilerGlobalScopeAttribute.cs
- HttpWebRequestElement.cs
- XmlDataFileEditor.cs
- ProgressBarBrushConverter.cs
- DataTableClearEvent.cs
- DataGridViewEditingControlShowingEventArgs.cs
- PaperSource.cs
- LayoutManager.cs
- InternalRelationshipCollection.cs
- SymmetricAlgorithm.cs
- Font.cs
- SetState.cs
- AssemblyAttributes.cs
- Tokenizer.cs
- PolicyLevel.cs
- DefaultWorkflowTransactionService.cs
- DoubleCollection.cs
- WindowsScroll.cs
- NavigationService.cs
- autovalidator.cs
- ReadOnlyDataSourceView.cs
- SettingsPropertyWrongTypeException.cs
- SafeFindHandle.cs
- RoleBoolean.cs
- RtfNavigator.cs
- DataServiceExpressionVisitor.cs
- processwaithandle.cs
- COAUTHIDENTITY.cs
- PrintingPermission.cs
- FontStyle.cs
- CategoryAttribute.cs