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
- FastPropertyAccessor.cs
- DmlSqlGenerator.cs
- ArgumentException.cs
- EmptyReadOnlyDictionaryInternal.cs
- TileBrush.cs
- ComponentResourceKey.cs
- CodeArrayCreateExpression.cs
- SecurityException.cs
- ProfileGroupSettings.cs
- xml.cs
- WindowsListBox.cs
- CodeMemberMethod.cs
- ClassImporter.cs
- CompositionAdorner.cs
- DependencyPropertyHelper.cs
- DesignerTransactionCloseEvent.cs
- ConnectionModeReader.cs
- BuildResult.cs
- SharedConnectionListener.cs
- SqlParameter.cs
- SynchronizedMessageSource.cs
- XmlQueryTypeFactory.cs
- Peer.cs
- QuotedPairReader.cs
- IChannel.cs
- DataGridHelper.cs
- LambdaCompiler.cs
- CodeDOMUtility.cs
- Line.cs
- HtmlToClrEventProxy.cs
- DispatchChannelSink.cs
- CaretElement.cs
- StringComparer.cs
- MimeMapping.cs
- EdgeModeValidation.cs
- DatePickerAutomationPeer.cs
- UnmanagedMemoryStream.cs
- MailBnfHelper.cs
- EncoderNLS.cs
- MemoryPressure.cs
- MetadataArtifactLoaderResource.cs
- XmlWrappingReader.cs
- UdpAnnouncementEndpoint.cs
- SignatureResourcePool.cs
- NumericUpDown.cs
- CroppedBitmap.cs
- KnownTypeDataContractResolver.cs
- ListView.cs
- Control.cs
- ContextQuery.cs
- AmbientValueAttribute.cs
- HostingEnvironmentException.cs
- XmlSchemaInclude.cs
- TraceLevelStore.cs
- MSAAWinEventWrap.cs
- HtmlLinkAdapter.cs
- SignatureToken.cs
- SingleResultAttribute.cs
- FileDialogCustomPlaces.cs
- XPathSelfQuery.cs
- SqlCaseSimplifier.cs
- Publisher.cs
- SqlStream.cs
- SqlLiftIndependentRowExpressions.cs
- DynamicILGenerator.cs
- TypeGeneratedEventArgs.cs
- CryptoHandle.cs
- _NegoStream.cs
- CreateUserWizardStep.cs
- ToggleButton.cs
- DataPagerFieldCommandEventArgs.cs
- TypeBrowserDialog.cs
- Sentence.cs
- HttpFormatExtensions.cs
- UpdateEventArgs.cs
- SecurityState.cs
- WeakReferenceKey.cs
- FormattedTextSymbols.cs
- PermissionAttributes.cs
- MenuItemBinding.cs
- AutoGeneratedField.cs
- BitmapEncoder.cs
- NamespaceEmitter.cs
- TrustManagerMoreInformation.cs
- DbDeleteCommandTree.cs
- WebPartManagerInternals.cs
- AccessDataSource.cs
- ToolStripItemDataObject.cs
- UnsafePeerToPeerMethods.cs
- PasswordRecovery.cs
- PerformanceCounter.cs
- BufferedResponseStream.cs
- StatusBarDrawItemEvent.cs
- JumpItem.cs
- HttpCapabilitiesSectionHandler.cs
- Column.cs
- DynamicQueryableWrapper.cs
- StringFormat.cs
- InternalTypeHelper.cs
- Attachment.cs