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
- DebugView.cs
- SynchronizedInputPattern.cs
- HwndMouseInputProvider.cs
- IISMapPath.cs
- UniqueConstraint.cs
- DataSourceSelectArguments.cs
- FlowDocumentReaderAutomationPeer.cs
- CachedFontFamily.cs
- Size.cs
- TargetParameterCountException.cs
- CodeDirectionExpression.cs
- SplitterPanelDesigner.cs
- TableCellCollection.cs
- BaseComponentEditor.cs
- Evaluator.cs
- ImageClickEventArgs.cs
- InteropAutomationProvider.cs
- SecurityHelper.cs
- DecryptedHeader.cs
- MethodMessage.cs
- SHA1.cs
- ObjectSet.cs
- DataKey.cs
- DockPanel.cs
- PolyQuadraticBezierSegment.cs
- OuterGlowBitmapEffect.cs
- Merger.cs
- IncrementalHitTester.cs
- VersionUtil.cs
- StringFunctions.cs
- CategoryNameCollection.cs
- WmlSelectionListAdapter.cs
- BaseDataList.cs
- ItemsPanelTemplate.cs
- LineBreak.cs
- ReversePositionQuery.cs
- EventDescriptorCollection.cs
- _ListenerResponseStream.cs
- CapiNative.cs
- ActivityXamlServices.cs
- IApplicationTrustManager.cs
- WebControl.cs
- CustomAttributeFormatException.cs
- TdsParserStateObject.cs
- PropertyEmitter.cs
- SHA256Managed.cs
- ModuleElement.cs
- TransformGroup.cs
- FieldNameLookup.cs
- SchemaManager.cs
- MissingManifestResourceException.cs
- NativeMethodsOther.cs
- BrowserTree.cs
- GeneratedContractType.cs
- ListDictionaryInternal.cs
- CryptoConfig.cs
- XPathNavigator.cs
- Keywords.cs
- ExpressionBuilder.cs
- SchemaCollectionPreprocessor.cs
- ColumnBinding.cs
- DrawingServices.cs
- FlowDocumentPaginator.cs
- NativeActivity.cs
- SocketException.cs
- UnsafeNetInfoNativeMethods.cs
- DynamicRendererThreadManager.cs
- HostVisual.cs
- StringFormat.cs
- AppSettingsExpressionBuilder.cs
- StateDesigner.TransitionInfo.cs
- TypeFieldSchema.cs
- DrawingContextDrawingContextWalker.cs
- ISessionStateStore.cs
- IgnorePropertiesAttribute.cs
- WeakRefEnumerator.cs
- ObjectDataSourceDisposingEventArgs.cs
- TableHeaderCell.cs
- Geometry.cs
- ValidationRuleCollection.cs
- KeyedHashAlgorithm.cs
- WebPartActionVerb.cs
- MsmqMessageSerializationFormat.cs
- Mapping.cs
- WindowsUpDown.cs
- Shared.cs
- PropertyPathConverter.cs
- OrderablePartitioner.cs
- SchemaMapping.cs
- XmlComplianceUtil.cs
- TagNameToTypeMapper.cs
- DesignerActionItemCollection.cs
- Application.cs
- Camera.cs
- SapiInterop.cs
- ConfigErrorGlyph.cs
- _BaseOverlappedAsyncResult.cs
- DataServiceQueryException.cs
- RoutedEvent.cs
- ModifierKeysConverter.cs