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
- ExportFileRequest.cs
- RC2CryptoServiceProvider.cs
- UTF32Encoding.cs
- HttpListenerResponse.cs
- Rect3DConverter.cs
- SizeKeyFrameCollection.cs
- XmlAnyAttributeAttribute.cs
- FileResponseElement.cs
- ContentDefinition.cs
- DurationConverter.cs
- SQLRoleProvider.cs
- ListViewItem.cs
- RegexBoyerMoore.cs
- MetadataElement.cs
- BufferedGraphicsManager.cs
- SettingsSection.cs
- Part.cs
- ToolStripTextBox.cs
- EditorZoneDesigner.cs
- TemplateBindingExpression.cs
- CopyNodeSetAction.cs
- RewritingPass.cs
- OneOfTypeConst.cs
- WebPartZoneBase.cs
- indexingfiltermarshaler.cs
- TableRow.cs
- SystemTcpStatistics.cs
- FileDataSourceCache.cs
- MessagePropertyAttribute.cs
- RuntimeArgumentHandle.cs
- DbTransaction.cs
- WebBrowserPermission.cs
- SchemaNamespaceManager.cs
- TreeNodeBinding.cs
- DataSourceControl.cs
- PropertyItem.cs
- ReadOnlyDictionary.cs
- SafeFreeMibTable.cs
- ParsedAttributeCollection.cs
- HandlerWithFactory.cs
- MergablePropertyAttribute.cs
- GridViewRowPresenterBase.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- StylusPoint.cs
- log.cs
- PathSegmentCollection.cs
- TriggerAction.cs
- ProcessHostFactoryHelper.cs
- DragDrop.cs
- AdRotatorDesigner.cs
- PermissionToken.cs
- PersonalizablePropertyEntry.cs
- CatalogZoneBase.cs
- TemplateDefinition.cs
- MatrixTransform.cs
- FixedSOMLineRanges.cs
- StreamingContext.cs
- SimplePropertyEntry.cs
- TTSEngineProxy.cs
- IOException.cs
- WebPartDisplayModeCancelEventArgs.cs
- DataSourceHelper.cs
- UnsafeNativeMethods.cs
- EmbossBitmapEffect.cs
- LinearGradientBrush.cs
- PreservationFileWriter.cs
- IntSumAggregationOperator.cs
- CfgSemanticTag.cs
- Input.cs
- WindowsIPAddress.cs
- HybridObjectCache.cs
- DataServiceHost.cs
- WebConvert.cs
- DirectoryGroupQuery.cs
- BaseProcessor.cs
- IdentitySection.cs
- RawStylusActions.cs
- XmlSchemaComplexContent.cs
- CategoryNameCollection.cs
- DisplayNameAttribute.cs
- NetworkInterface.cs
- RawTextInputReport.cs
- DateTimeValueSerializerContext.cs
- ProcessingInstructionAction.cs
- StackOverflowException.cs
- Cursor.cs
- PersonalizationDictionary.cs
- SingletonInstanceContextProvider.cs
- DisplayInformation.cs
- CapabilitiesSection.cs
- PositiveTimeSpanValidator.cs
- AsyncPostBackTrigger.cs
- MarkerProperties.cs
- DispatcherEventArgs.cs
- CommentEmitter.cs
- TypeForwardedToAttribute.cs
- CodeLinePragma.cs
- HebrewNumber.cs
- OleDbCommand.cs
- DesignerSerializerAttribute.cs