Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / 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. 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
- CodeTypeParameterCollection.cs
- ObjectView.cs
- ImageCodecInfoPrivate.cs
- KoreanLunisolarCalendar.cs
- RenderData.cs
- ServiceDescriptionSerializer.cs
- PersonalizationStateInfo.cs
- TargetException.cs
- TextEditorTables.cs
- PageEventArgs.cs
- DescendantOverDescendantQuery.cs
- XslTransformFileEditor.cs
- CodeAccessPermission.cs
- LoggedException.cs
- OleDbRowUpdatedEvent.cs
- EncryptedType.cs
- DefaultSettingsSection.cs
- XpsManager.cs
- DesignTimeXamlWriter.cs
- DataServiceClientException.cs
- TreeViewItemAutomationPeer.cs
- ColorConvertedBitmap.cs
- AmbientLight.cs
- TextFormatterImp.cs
- HwndSource.cs
- ProxyHelper.cs
- VoiceObjectToken.cs
- HtmlImage.cs
- SessionState.cs
- IsolatedStorageFile.cs
- ResXResourceSet.cs
- EditorPartCollection.cs
- SQLBytesStorage.cs
- XmlEncodedRawTextWriter.cs
- Pair.cs
- ParagraphResult.cs
- ActivityDesignerAccessibleObject.cs
- PointCollectionValueSerializer.cs
- EmptyQuery.cs
- CodeNamespaceImport.cs
- DecimalStorage.cs
- UniqueEventHelper.cs
- GridItemPattern.cs
- MILUtilities.cs
- CounterCreationDataCollection.cs
- RegexStringValidator.cs
- RecipientServiceModelSecurityTokenRequirement.cs
- HttpRequestMessageProperty.cs
- SystemIcmpV6Statistics.cs
- Publisher.cs
- OracleInternalConnection.cs
- IsolatedStorageException.cs
- SHA512Managed.cs
- ColorConverter.cs
- WindowsNonControl.cs
- XmlDigitalSignatureProcessor.cs
- FrameworkContentElementAutomationPeer.cs
- MsmqProcessProtocolHandler.cs
- IxmlLineInfo.cs
- XamlValidatingReader.cs
- ScrollData.cs
- ChameleonKey.cs
- DbModificationCommandTree.cs
- QilFactory.cs
- WsdlContractConversionContext.cs
- BaseTemplateParser.cs
- WriteTimeStream.cs
- FixedTextSelectionProcessor.cs
- ObjectStorage.cs
- ParserContext.cs
- ClientCredentialsElement.cs
- ThreadInterruptedException.cs
- Point3DCollection.cs
- HtmlTitle.cs
- CodeCommentStatement.cs
- Panel.cs
- Unit.cs
- OutgoingWebResponseContext.cs
- MappingSource.cs
- FileEnumerator.cs
- SevenBitStream.cs
- TrustLevelCollection.cs
- Variable.cs
- PickBranch.cs
- HostedImpersonationContext.cs
- LazyInitializer.cs
- TripleDESCryptoServiceProvider.cs
- GeneralTransform3D.cs
- CursorInteropHelper.cs
- Stack.cs
- DocumentViewerBase.cs
- SamlConstants.cs
- SRGSCompiler.cs
- ObjectViewQueryResultData.cs
- ListenerElementsCollection.cs
- HTMLTextWriter.cs
- QueryExpr.cs
- ResourceManagerWrapper.cs
- DataBindingList.cs
- CachedTypeface.cs