Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / ContentOperations.cs / 1 / 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
- DocumentEventArgs.cs
- AbandonedMutexException.cs
- PerformanceCounterPermission.cs
- UDPClient.cs
- TextBoxRenderer.cs
- XpsDocumentEvent.cs
- HttpListenerContext.cs
- SendingRequestEventArgs.cs
- BindingManagerDataErrorEventArgs.cs
- WebSysDefaultValueAttribute.cs
- CustomErrorCollection.cs
- DataColumn.cs
- MethodCallTranslator.cs
- SettingsBindableAttribute.cs
- ObjectPropertyMapping.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- WorkflowInlining.cs
- XmlArrayItemAttributes.cs
- RootAction.cs
- ServiceBusyException.cs
- XmlExtensionFunction.cs
- WarningException.cs
- StyleSelector.cs
- MD5HashHelper.cs
- SourceSwitch.cs
- GridErrorDlg.cs
- PaintValueEventArgs.cs
- CreateSequence.cs
- COM2PictureConverter.cs
- WindowInteractionStateTracker.cs
- LineSegment.cs
- FirewallWrapper.cs
- NonParentingControl.cs
- CatalogZoneBase.cs
- CodeSnippetExpression.cs
- TailCallAnalyzer.cs
- TextParagraphProperties.cs
- WsatExtendedInformation.cs
- MarshalByValueComponent.cs
- HttpConfigurationContext.cs
- Window.cs
- remotingproxy.cs
- TrustManagerMoreInformation.cs
- CaseCqlBlock.cs
- CollectionView.cs
- ReferenceService.cs
- XmlParserContext.cs
- DataGridViewRowHeaderCell.cs
- xml.cs
- CustomAttributeBuilder.cs
- SqlCommandBuilder.cs
- TextInfo.cs
- PlanCompilerUtil.cs
- SamlAttributeStatement.cs
- ExpressionWriter.cs
- DateRangeEvent.cs
- GregorianCalendar.cs
- CollectionViewProxy.cs
- WSDualHttpSecurityElement.cs
- PrintControllerWithStatusDialog.cs
- XmlSchemaSet.cs
- DataPointer.cs
- GridViewAutomationPeer.cs
- TreeIterator.cs
- LocalValueEnumerator.cs
- HTTPNotFoundHandler.cs
- Hex.cs
- ConnectionStringSettings.cs
- DataGridViewImageCell.cs
- ResourceManagerWrapper.cs
- XmlDictionaryReaderQuotas.cs
- WSFederationHttpSecurityElement.cs
- BrushConverter.cs
- SystemIPv4InterfaceProperties.cs
- SelectorItemAutomationPeer.cs
- FixedNode.cs
- CollectionBuilder.cs
- PtsPage.cs
- NavigationFailedEventArgs.cs
- MatrixAnimationUsingPath.cs
- RepeaterItem.cs
- ZipIOExtraField.cs
- BaseProcessor.cs
- LogicalChannel.cs
- MenuStrip.cs
- __FastResourceComparer.cs
- sqlser.cs
- DataGridViewLayoutData.cs
- RoleManagerSection.cs
- LinqDataSource.cs
- TypeContext.cs
- ConsumerConnectionPoint.cs
- ValueHandle.cs
- UnsafePeerToPeerMethods.cs
- ChangePasswordAutoFormat.cs
- CompilationUtil.cs
- OfTypeExpression.cs
- IODescriptionAttribute.cs
- WebPartEventArgs.cs
- InvokePattern.cs