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
- recordstatescratchpad.cs
- DrawingAttributeSerializer.cs
- StructuralComparisons.cs
- EdgeModeValidation.cs
- PagedDataSource.cs
- Utils.cs
- PointCollectionConverter.cs
- CngKey.cs
- DuplicateWaitObjectException.cs
- ButtonFieldBase.cs
- VerbConverter.cs
- ImageKeyConverter.cs
- PropertyTabAttribute.cs
- PreservationFileReader.cs
- MarkedHighlightComponent.cs
- TaskHelper.cs
- TdsEnums.cs
- SystemUnicastIPAddressInformation.cs
- ImageInfo.cs
- DependencyPropertyValueSerializer.cs
- SqlBulkCopy.cs
- BitmapInitialize.cs
- PreservationFileReader.cs
- ContextStaticAttribute.cs
- SqlDataSourceCommandEventArgs.cs
- SplineKeyFrames.cs
- RenderDataDrawingContext.cs
- SymLanguageVendor.cs
- ProtectedConfigurationProviderCollection.cs
- DataGridViewCellConverter.cs
- QueryableFilterRepeater.cs
- compensatingcollection.cs
- WorkflowOperationAsyncResult.cs
- EditingCommands.cs
- iisPickupDirectory.cs
- KeyMatchBuilder.cs
- BindingManagerDataErrorEventArgs.cs
- DesignerSerializationVisibilityAttribute.cs
- InvalidTimeZoneException.cs
- InstalledFontCollection.cs
- ImageInfo.cs
- QilXmlWriter.cs
- EastAsianLunisolarCalendar.cs
- MsiStyleLogWriter.cs
- DataGridViewRowsAddedEventArgs.cs
- OleDbParameter.cs
- ScrollItemPattern.cs
- CheckBoxList.cs
- HttpApplicationStateWrapper.cs
- ButtonColumn.cs
- XmlDownloadManager.cs
- OutOfProcStateClientManager.cs
- OciEnlistContext.cs
- NotImplementedException.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- CheckBoxPopupAdapter.cs
- IfAction.cs
- LeaseManager.cs
- BadImageFormatException.cs
- ColorPalette.cs
- DifferencingCollection.cs
- TextBoxBase.cs
- RootBrowserWindowAutomationPeer.cs
- SmtpMail.cs
- PartialList.cs
- ConnectionManagementElementCollection.cs
- MessageQueueKey.cs
- OleDbStruct.cs
- Proxy.cs
- BitStack.cs
- ImageClickEventArgs.cs
- RTLAwareMessageBox.cs
- RenderData.cs
- NumericUpDownAccelerationCollection.cs
- DesignTimeVisibleAttribute.cs
- BinaryObjectWriter.cs
- DesignTimeParseData.cs
- ConfigurationValues.cs
- BCryptHashAlgorithm.cs
- Rotation3D.cs
- DecimalAnimation.cs
- CqlLexer.cs
- MailSettingsSection.cs
- RemotingServices.cs
- InkCanvasSelectionAdorner.cs
- Vertex.cs
- UxThemeWrapper.cs
- PatternMatcher.cs
- DocumentViewerHelper.cs
- ButtonChrome.cs
- ArrangedElementCollection.cs
- WebDisplayNameAttribute.cs
- RawStylusActions.cs
- DefaultHttpHandler.cs
- ResolveNextArgumentWorkItem.cs
- ListViewItem.cs
- XmlRawWriter.cs
- DataGridViewComboBoxColumn.cs
- DoubleCollection.cs
- PeerConnector.cs