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
- CustomTrackingQuery.cs
- XmlnsCache.cs
- SymbolDocumentGenerator.cs
- AttachmentCollection.cs
- SqlResolver.cs
- Main.cs
- SafeViewOfFileHandle.cs
- PriorityQueue.cs
- XmlHierarchicalDataSourceView.cs
- BindStream.cs
- RegexReplacement.cs
- TransformFinalBlockRequest.cs
- SqlUdtInfo.cs
- InputEventArgs.cs
- HttpSysSettings.cs
- DragStartedEventArgs.cs
- RSAOAEPKeyExchangeDeformatter.cs
- GAC.cs
- StaticResourceExtension.cs
- AnimationClock.cs
- SafeNativeMemoryHandle.cs
- XmlAttributes.cs
- ValuePatternIdentifiers.cs
- MailDefinition.cs
- ParallelSeparator.xaml.cs
- TraceUtility.cs
- XmlValidatingReader.cs
- SectionVisual.cs
- ServiceProviders.cs
- QueryContinueDragEventArgs.cs
- NameValueConfigurationElement.cs
- TrustLevelCollection.cs
- SessionStateModule.cs
- RepeaterItemEventArgs.cs
- TextEditorSelection.cs
- ResourceDescriptionAttribute.cs
- shaper.cs
- FormViewUpdateEventArgs.cs
- XhtmlCssHandler.cs
- ListViewInsertedEventArgs.cs
- CodeDOMProvider.cs
- InstanceKey.cs
- ContextMenuStrip.cs
- InfoCardRSACryptoProvider.cs
- OleDbRowUpdatedEvent.cs
- NGCPageContentCollectionSerializerAsync.cs
- RegistrationContext.cs
- CodeAttributeDeclaration.cs
- PeerTransportListenAddressValidatorAttribute.cs
- SoapUnknownHeader.cs
- SimpleType.cs
- ControlBuilder.cs
- BindingSource.cs
- SafeRegistryKey.cs
- ApplicationDirectory.cs
- CodeObject.cs
- CryptoKeySecurity.cs
- SqlAggregateChecker.cs
- XmlnsDefinitionAttribute.cs
- Soap.cs
- DataKey.cs
- SpellerHighlightLayer.cs
- StreamingContext.cs
- X509Chain.cs
- WorkflowApplicationException.cs
- StrokeRenderer.cs
- DBDataPermission.cs
- _NegoStream.cs
- SoundPlayerAction.cs
- ReadOnlyDictionary.cs
- SortExpressionBuilder.cs
- SafeFileMappingHandle.cs
- CommentEmitter.cs
- DBPropSet.cs
- RawStylusInputReport.cs
- ViewStateChangedEventArgs.cs
- XLinq.cs
- MessageBox.cs
- EncoderParameters.cs
- RegexParser.cs
- GridViewUpdateEventArgs.cs
- ByteStreamGeometryContext.cs
- TransformDescriptor.cs
- DataGridRelationshipRow.cs
- ProvidePropertyAttribute.cs
- WebPartTracker.cs
- ListenerServiceInstallComponent.cs
- SqlDataSourceEnumerator.cs
- remotingproxy.cs
- GradientBrush.cs
- KeyValueSerializer.cs
- CapabilitiesAssignment.cs
- FixUp.cs
- StateFinalizationDesigner.cs
- PropertyToken.cs
- AssemblyCollection.cs
- Int64KeyFrameCollection.cs
- SelectedCellsChangedEventArgs.cs
- RegexFCD.cs
- DiscoveryRequestHandler.cs