Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / ContentOperations.cs / 1305600 / ContentOperations.cs
namespace System.Windows { ////// This interface defines the common methods and services available from a ContentElement. /// public static class ContentOperations { ////// Get the Visual parent of this ContentElement. /// public static DependencyObject GetParent(ContentElement reference) { if(reference == null) { throw new ArgumentNullException("reference"); } return reference._parent; } ////// Set the Visual parent of this ContentElement. /// ////// This is different than Visuals. For Visuals, you have to /// Add/Remove the visual from a children collection to change /// the parent. I think it is a better model, but I don't /// know if we want to expose a full children collection for /// content elements. /// public static void SetParent(ContentElement reference, DependencyObject parent) { if(reference == null) { throw new ArgumentNullException("reference"); } DependencyObject oldParent = reference._parent; reference._parent = parent; // Raise content parent changed notification reference.OnContentParentChanged(oldParent); } } } // 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
- BaseCodeDomTreeGenerator.cs
- HighContrastHelper.cs
- DESCryptoServiceProvider.cs
- MonthCalendar.cs
- ClientConfigurationSystem.cs
- SHA384Managed.cs
- Geometry.cs
- Content.cs
- _DisconnectOverlappedAsyncResult.cs
- ParentUndoUnit.cs
- Utils.cs
- ParallelForEach.cs
- DoubleLinkListEnumerator.cs
- TimelineGroup.cs
- HexParser.cs
- SynchronizedPool.cs
- BamlLocalizationDictionary.cs
- PropertyAccessVisitor.cs
- CollectionsUtil.cs
- ScrollableControl.cs
- DataGridViewDataErrorEventArgs.cs
- MultiByteCodec.cs
- Listbox.cs
- webeventbuffer.cs
- Main.cs
- OleTxTransaction.cs
- DataGridTableCollection.cs
- MergeFilterQuery.cs
- ToolStripItem.cs
- Misc.cs
- _SslState.cs
- SqlFacetAttribute.cs
- InternalReceiveMessage.cs
- HtmlTableRowCollection.cs
- RawUIStateInputReport.cs
- EastAsianLunisolarCalendar.cs
- MetabaseServerConfig.cs
- Size3DValueSerializer.cs
- TextDecoration.cs
- AnnotationComponentManager.cs
- InstanceData.cs
- CompositeFontParser.cs
- StateBag.cs
- CryptoStream.cs
- AsyncPostBackErrorEventArgs.cs
- Scalars.cs
- SiteMembershipCondition.cs
- SafeLocalAllocation.cs
- Hash.cs
- CannotUnloadAppDomainException.cs
- VScrollBar.cs
- CopyOnWriteList.cs
- DataGridBoundColumn.cs
- TrackingProfileCache.cs
- CodeGeneratorOptions.cs
- safelinkcollection.cs
- dataobject.cs
- XmlDataFileEditor.cs
- HtmlInputText.cs
- UidManager.cs
- TogglePattern.cs
- MessageDispatch.cs
- HijriCalendar.cs
- DataTableNewRowEvent.cs
- LinearGradientBrush.cs
- XhtmlMobileTextWriter.cs
- DeclarativeCatalogPart.cs
- BookmarkCallbackWrapper.cs
- PreDigestedSignedInfo.cs
- Int16Storage.cs
- SqlClientWrapperSmiStream.cs
- XNodeValidator.cs
- SAPICategories.cs
- MSHTMLHostUtil.cs
- TextCollapsingProperties.cs
- CopyOfAction.cs
- RoleManagerModule.cs
- arabicshape.cs
- BuildProvidersCompiler.cs
- SmiContext.cs
- Brush.cs
- EntityParameterCollection.cs
- SapiInterop.cs
- LineServices.cs
- ProfileGroupSettings.cs
- WebServiceData.cs
- SecurityTokenSerializer.cs
- WebPartConnectionsCancelEventArgs.cs
- CalculatedColumn.cs
- AspCompat.cs
- DES.cs
- IssuedTokenServiceCredential.cs
- panel.cs
- CodeAttributeArgumentCollection.cs
- ActionMessageFilter.cs
- RegistrySecurity.cs
- BaseProcessor.cs
- SharedUtils.cs
- MetadataUtilsSmi.cs
- AttributeTable.cs