Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ExtensionElementCollection.cs
- TimelineGroup.cs
- TextWriterEngine.cs
- SessionState.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- XmlRawWriterWrapper.cs
- TransformGroup.cs
- SafeViewOfFileHandle.cs
- ApplicationManager.cs
- OpCodes.cs
- EventListenerClientSide.cs
- Asn1IntegerConverter.cs
- TrackingMemoryStream.cs
- AssemblyNameProxy.cs
- WindowsScrollBarBits.cs
- IconBitmapDecoder.cs
- SqlBuilder.cs
- MappingModelBuildProvider.cs
- MetadataHelper.cs
- UnsafeNativeMethods.cs
- Win32.cs
- SqlTypeConverter.cs
- Parser.cs
- ListenerSessionConnection.cs
- FilterableAttribute.cs
- BuiltInPermissionSets.cs
- FigureHelper.cs
- CompilerGlobalScopeAttribute.cs
- XmlWriter.cs
- ArgIterator.cs
- FragmentNavigationEventArgs.cs
- MetadataArtifactLoaderCompositeFile.cs
- SendKeys.cs
- MultiplexingFormatMapping.cs
- ButtonFieldBase.cs
- CodeTypeParameter.cs
- SqlWebEventProvider.cs
- RenderContext.cs
- MailBnfHelper.cs
- WebPartChrome.cs
- InteropBitmapSource.cs
- TextRangeEditTables.cs
- RuntimeVariableList.cs
- UseAttributeSetsAction.cs
- XmlDsigSep2000.cs
- AnonymousIdentificationSection.cs
- SystemResources.cs
- MoveSizeWinEventHandler.cs
- InteropEnvironment.cs
- RuntimeConfigLKG.cs
- FragmentQueryProcessor.cs
- ActivityExecutorOperation.cs
- Expander.cs
- WebPartMinimizeVerb.cs
- ValuePattern.cs
- Baml2006KeyRecord.cs
- AnimationTimeline.cs
- DataGridViewElement.cs
- DrawListViewSubItemEventArgs.cs
- BitmapDecoder.cs
- CultureInfoConverter.cs
- RenamedEventArgs.cs
- Binding.cs
- AuthorizationRuleCollection.cs
- FrameworkContentElement.cs
- FixedSOMSemanticBox.cs
- WebControlToolBoxItem.cs
- SqlConnection.cs
- MetaColumn.cs
- CriticalHandle.cs
- ConfigurationLockCollection.cs
- XmlComplianceUtil.cs
- DocumentSchemaValidator.cs
- StoreItemCollection.cs
- CreatingCookieEventArgs.cs
- LayoutTableCell.cs
- HwndProxyElementProvider.cs
- SqlGenericUtil.cs
- Fx.cs
- MetadataPropertyvalue.cs
- XmlAnyElementAttribute.cs
- basecomparevalidator.cs
- ConsumerConnectionPointCollection.cs
- LiteralText.cs
- PixelFormat.cs
- DbProviderFactoriesConfigurationHandler.cs
- MailAddressCollection.cs
- ToolStripScrollButton.cs
- UriTemplate.cs
- dsa.cs
- ModuleBuilder.cs
- HeaderPanel.cs
- MenuItemStyleCollectionEditor.cs
- AppLevelCompilationSectionCache.cs
- ApplicationInfo.cs
- CompressedStack.cs
- TextWriterTraceListener.cs
- OpCellTreeNode.cs
- ToolStripItemBehavior.cs
- CompareValidator.cs