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
- GenericEnumConverter.cs
- DateTimeSerializationSection.cs
- PageThemeBuildProvider.cs
- counter.cs
- PrimitiveSchema.cs
- StrokeNodeOperations.cs
- SqlDataSourceCommandEventArgs.cs
- PageThemeCodeDomTreeGenerator.cs
- XpsPackagingException.cs
- EmissiveMaterial.cs
- Int16KeyFrameCollection.cs
- NativeMethods.cs
- PropertyInfoSet.cs
- XmlSchemaDatatype.cs
- ProxyManager.cs
- VScrollBar.cs
- EmptyEnumerable.cs
- SoundPlayerAction.cs
- RegistryConfigurationProvider.cs
- DetailsViewCommandEventArgs.cs
- DesignerForm.cs
- GridToolTip.cs
- ColumnWidthChangedEvent.cs
- RadioButtonStandardAdapter.cs
- Compiler.cs
- SchemaSetCompiler.cs
- ArraySortHelper.cs
- TypeInitializationException.cs
- BlurBitmapEffect.cs
- WebPartTransformer.cs
- ComponentCollection.cs
- HttpGetServerProtocol.cs
- DynamicValidatorEventArgs.cs
- PageStatePersister.cs
- RegistrationProxy.cs
- CacheMode.cs
- RecoverInstanceLocksCommand.cs
- ScalarType.cs
- XmlWrappingReader.cs
- WindowsScrollBarBits.cs
- webbrowsersite.cs
- NetWebProxyFinder.cs
- InvokeMethodActivity.cs
- WebEventTraceProvider.cs
- FileDialog.cs
- HostingPreferredMapPath.cs
- PointKeyFrameCollection.cs
- SystemInfo.cs
- EnvelopedPkcs7.cs
- RightsManagementInformation.cs
- UnsafePeerToPeerMethods.cs
- HMAC.cs
- ProfileGroupSettingsCollection.cs
- SecurityTokenTypes.cs
- HyperlinkAutomationPeer.cs
- XmlSerializer.cs
- DoubleAnimation.cs
- BaseCodeDomTreeGenerator.cs
- ImageResources.Designer.cs
- StringFormat.cs
- StateElementCollection.cs
- WmfPlaceableFileHeader.cs
- FilterEventArgs.cs
- XmlDataSourceView.cs
- TdsRecordBufferSetter.cs
- CannotUnloadAppDomainException.cs
- TreeView.cs
- Set.cs
- Reference.cs
- Win32Native.cs
- HostedAspNetEnvironment.cs
- ImportDesigner.xaml.cs
- UdpContractFilterBehavior.cs
- CustomAttributeSerializer.cs
- StylusTip.cs
- JpegBitmapDecoder.cs
- StyleXamlTreeBuilder.cs
- Int32AnimationBase.cs
- WebColorConverter.cs
- FileDataSourceCache.cs
- EdmEntityTypeAttribute.cs
- WebWorkflowRole.cs
- PropertyValueUIItem.cs
- MasterPageCodeDomTreeGenerator.cs
- XmlQueryContext.cs
- Splitter.cs
- GiveFeedbackEvent.cs
- ProcessRequestArgs.cs
- CompositionTarget.cs
- CannotUnloadAppDomainException.cs
- RecommendedAsConfigurableAttribute.cs
- Tablet.cs
- SinglePageViewer.cs
- ObjectViewListener.cs
- Timeline.cs
- TextAction.cs
- ValidationResult.cs
- ImageBrush.cs
- UIElementAutomationPeer.cs
- AnnotationStore.cs