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
- RunWorkerCompletedEventArgs.cs
- SmtpDigestAuthenticationModule.cs
- ToolConsole.cs
- UshortList2.cs
- RoutedPropertyChangedEventArgs.cs
- FormViewPageEventArgs.cs
- SafeEventLogWriteHandle.cs
- SuppressMessageAttribute.cs
- WebPartAddingEventArgs.cs
- NodeFunctions.cs
- HtmlControlPersistable.cs
- ValidationErrorCollection.cs
- HwndSubclass.cs
- ResizeGrip.cs
- ErrorFormatter.cs
- SemanticResultKey.cs
- CannotUnloadAppDomainException.cs
- CustomDictionarySources.cs
- AuthenticatingEventArgs.cs
- HtmlWindow.cs
- StorageConditionPropertyMapping.cs
- HwndAppCommandInputProvider.cs
- HwndTarget.cs
- HtmlContainerControl.cs
- Variable.cs
- ByteAnimation.cs
- VirtualPath.cs
- MsdtcClusterUtils.cs
- ServicePointManager.cs
- mediaeventshelper.cs
- SqlDataSourceConfigureSelectPanel.cs
- DataErrorValidationRule.cs
- SearchForVirtualItemEventArgs.cs
- SmtpCommands.cs
- securitymgrsite.cs
- ListViewItemCollectionEditor.cs
- WithStatement.cs
- BStrWrapper.cs
- CacheForPrimitiveTypes.cs
- CollectionBuilder.cs
- TimeSpan.cs
- wgx_sdk_version.cs
- PipelineModuleStepContainer.cs
- CriticalFinalizerObject.cs
- XmlWrappingWriter.cs
- XamlTreeBuilderBamlRecordWriter.cs
- KnownTypesHelper.cs
- Int32Storage.cs
- SqlRemoveConstantOrderBy.cs
- ComponentEvent.cs
- ForwardPositionQuery.cs
- IItemContainerGenerator.cs
- BindingExpressionBase.cs
- SafeUserTokenHandle.cs
- HtmlControlDesigner.cs
- DocumentSequenceHighlightLayer.cs
- SmtpFailedRecipientException.cs
- sqlnorm.cs
- PathFigure.cs
- MetadataArtifactLoaderFile.cs
- CleanUpVirtualizedItemEventArgs.cs
- DatagridviewDisplayedBandsData.cs
- ToolbarAUtomationPeer.cs
- LayoutInformation.cs
- BamlReader.cs
- PipeSecurity.cs
- DateTime.cs
- ProcessStartInfo.cs
- PolicyUtility.cs
- TrustManagerMoreInformation.cs
- SiteMapDataSourceView.cs
- GridViewRow.cs
- SetterBase.cs
- Mapping.cs
- CrossContextChannel.cs
- TabControl.cs
- ValidationErrorCollection.cs
- SafeProcessHandle.cs
- KeyedCollection.cs
- EntityClassGenerator.cs
- Util.cs
- InstancePersistence.cs
- StylusPointDescription.cs
- NotifyCollectionChangedEventArgs.cs
- DBDataPermissionAttribute.cs
- NetworkInformationException.cs
- TreeView.cs
- XmlSerializerSection.cs
- CornerRadiusConverter.cs
- ApplicationActivator.cs
- SAPIEngineTypes.cs
- KeyboardDevice.cs
- SimpleWebHandlerParser.cs
- WebPartUserCapability.cs
- ITextView.cs
- ZipIOExtraFieldPaddingElement.cs
- TextMetrics.cs
- FontSizeConverter.cs
- ClusterSafeNativeMethods.cs
- SimpleTypesSurrogate.cs