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
- ImpersonationContext.cs
- BorderGapMaskConverter.cs
- BinaryReader.cs
- ValidatedControlConverter.cs
- CachedFontFamily.cs
- PartitionedStream.cs
- DesignBindingValueUIHandler.cs
- SiteMap.cs
- CurrencyWrapper.cs
- _NativeSSPI.cs
- NativeMethods.cs
- ClusterRegistryConfigurationProvider.cs
- DataSysAttribute.cs
- FrameworkElementFactoryMarkupObject.cs
- TypeDelegator.cs
- MissingSatelliteAssemblyException.cs
- SqlBuilder.cs
- HttpCapabilitiesBase.cs
- DBPropSet.cs
- SecurityHeaderLayout.cs
- XhtmlConformanceSection.cs
- RowToParametersTransformer.cs
- StrokeNodeEnumerator.cs
- MatrixTransform.cs
- SqlProcedureAttribute.cs
- DrawListViewColumnHeaderEventArgs.cs
- CanExecuteRoutedEventArgs.cs
- Merger.cs
- GuidConverter.cs
- OleDbWrapper.cs
- QueryActivatableWorkflowsCommand.cs
- Label.cs
- BaseConfigurationRecord.cs
- Size.cs
- DataGridViewCellStyle.cs
- FindCriteria.cs
- ServiceOperation.cs
- Logging.cs
- Matrix3DStack.cs
- TextRange.cs
- Int32CAMarshaler.cs
- HiddenFieldPageStatePersister.cs
- XamlToRtfWriter.cs
- PasswordPropertyTextAttribute.cs
- MultiplexingFormatMapping.cs
- SqlUserDefinedTypeAttribute.cs
- ResourceBinder.cs
- EpmAttributeNameBuilder.cs
- XmlSchemaComplexContentExtension.cs
- CodeTypeReferenceExpression.cs
- SqlStream.cs
- BitmapScalingModeValidation.cs
- HtmlInputButton.cs
- ValueType.cs
- FlowLayout.cs
- TransformConverter.cs
- DbConnectionStringCommon.cs
- StreamReader.cs
- ControlPaint.cs
- ListViewItem.cs
- Size3D.cs
- StateManagedCollection.cs
- ListBox.cs
- Touch.cs
- Object.cs
- WindowsIPAddress.cs
- DataGridViewRowHeaderCell.cs
- ProfilePropertySettingsCollection.cs
- DataViewManager.cs
- RectangleGeometry.cs
- XmlILCommand.cs
- FontStyle.cs
- ProfileModule.cs
- ContextMarshalException.cs
- ModelItemExtensions.cs
- OdbcConnectionStringbuilder.cs
- RuntimeWrappedException.cs
- PersonalizationEntry.cs
- ThreadExceptionDialog.cs
- StringFormat.cs
- XsltException.cs
- Pkcs9Attribute.cs
- DesignerAdapterUtil.cs
- RequestBringIntoViewEventArgs.cs
- FilterFactory.cs
- ISFTagAndGuidCache.cs
- EnvironmentPermission.cs
- SqlCacheDependency.cs
- FullTextLine.cs
- TypeContext.cs
- XmlSchemaValidationException.cs
- ExpressionConverter.cs
- IdentityManager.cs
- TemplateControlBuildProvider.cs
- DataFieldConverter.cs
- DependsOnAttribute.cs
- MemberAccessException.cs
- ScriptModule.cs
- XmlDownloadManager.cs
- ScriptReferenceBase.cs