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
- StopStoryboard.cs
- CultureSpecificStringDictionary.cs
- MetadataUtil.cs
- LocalizeDesigner.cs
- DiscoveryServerProtocol.cs
- MDIClient.cs
- WmpBitmapEncoder.cs
- DocumentOutline.cs
- SinglePageViewer.cs
- WebPartMenuStyle.cs
- ProcessStartInfo.cs
- DesignTimeValidationFeature.cs
- TdsParserStateObject.cs
- ClientBuildManagerCallback.cs
- DataBindEngine.cs
- UxThemeWrapper.cs
- ListViewDeletedEventArgs.cs
- PropertyConverter.cs
- DebugView.cs
- BypassElementCollection.cs
- GenericRootAutomationPeer.cs
- WebBrowserSiteBase.cs
- HttpCapabilitiesSectionHandler.cs
- LoginUtil.cs
- CollectionContainer.cs
- CompilerTypeWithParams.cs
- HttpClientCredentialType.cs
- BStrWrapper.cs
- AccessKeyManager.cs
- SerialReceived.cs
- QilValidationVisitor.cs
- ConstNode.cs
- ConstraintStruct.cs
- SingleKeyFrameCollection.cs
- QilPatternFactory.cs
- ByeMessageCD1.cs
- OutputScope.cs
- ButtonFieldBase.cs
- ISAPIRuntime.cs
- ProcessModuleCollection.cs
- URL.cs
- SQLSingle.cs
- StyleBamlTreeBuilder.cs
- ResourceWriter.cs
- DataGridTableCollection.cs
- RequestNavigateEventArgs.cs
- BCLDebug.cs
- SettingsProviderCollection.cs
- TemplatePropertyEntry.cs
- ToggleButton.cs
- CookieParameter.cs
- TextShapeableCharacters.cs
- _SslSessionsCache.cs
- ObjectListComponentEditor.cs
- OpenTypeLayout.cs
- TypedElement.cs
- TcpAppDomainProtocolHandler.cs
- DSASignatureDeformatter.cs
- _SecureChannel.cs
- UnmanagedMemoryStream.cs
- DelegateBodyWriter.cs
- MatrixTransform3D.cs
- SqlRecordBuffer.cs
- FileSecurity.cs
- MenuItem.cs
- _LocalDataStore.cs
- DirectoryLocalQuery.cs
- TransactionState.cs
- TableChangeProcessor.cs
- SchemaMapping.cs
- Stack.cs
- ColumnPropertiesGroup.cs
- Debugger.cs
- Helper.cs
- DeleteIndexBinder.cs
- CollectionExtensions.cs
- ActivityPreviewDesigner.cs
- StateMachineHelpers.cs
- Interlocked.cs
- CacheOutputQuery.cs
- DeclaredTypeElement.cs
- HtmlElementErrorEventArgs.cs
- CodeLabeledStatement.cs
- DescendantQuery.cs
- streamingZipPartStream.cs
- StaticFileHandler.cs
- SignatureToken.cs
- UITypeEditor.cs
- TableLayoutPanelCellPosition.cs
- ResourceExpressionEditor.cs
- StrokeCollection.cs
- FixedSOMElement.cs
- KerberosSecurityTokenProvider.cs
- Path.cs
- HtmlTableRow.cs
- XmlEncodedRawTextWriter.cs
- NonSerializedAttribute.cs
- WizardPanel.cs
- XmlSubtreeReader.cs
- MsmqPoisonMessageException.cs