Code:
/ 4.0 / 4.0 / 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. 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
- Evidence.cs
- MessageBuffer.cs
- BaseTemplateParser.cs
- ActiveXContainer.cs
- SharedUtils.cs
- JavaScriptObjectDeserializer.cs
- XmlSerializerFactory.cs
- dbenumerator.cs
- ImageListStreamer.cs
- UntrustedRecipientException.cs
- CodeTypeMemberCollection.cs
- ReadOnlyTernaryTree.cs
- BindingSource.cs
- ExceptionRoutedEventArgs.cs
- LinqDataSourceHelper.cs
- ToolbarAUtomationPeer.cs
- Accessible.cs
- InfoCardArgumentException.cs
- WorkflowNamespace.cs
- DoubleAverageAggregationOperator.cs
- ConstrainedGroup.cs
- XPathScanner.cs
- WebAdminConfigurationHelper.cs
- PasswordTextNavigator.cs
- FileClassifier.cs
- DecimalAnimation.cs
- ColumnClickEvent.cs
- sqlstateclientmanager.cs
- ContextStaticAttribute.cs
- WebPartHelpVerb.cs
- FilterQuery.cs
- HtmlShim.cs
- ExtensionSimplifierMarkupObject.cs
- TextShapeableCharacters.cs
- SqlPersistenceProviderFactory.cs
- StrongNameMembershipCondition.cs
- FileCodeGroup.cs
- CacheMemory.cs
- ManagementQuery.cs
- PolicyValidationException.cs
- ToolStripSeparatorRenderEventArgs.cs
- DatePickerDateValidationErrorEventArgs.cs
- DataGridTablesFactory.cs
- ContentTextAutomationPeer.cs
- SpellCheck.cs
- EncryptedData.cs
- MarshalByRefObject.cs
- ExpressionWriter.cs
- IxmlLineInfo.cs
- XmlSchemaCompilationSettings.cs
- WebServiceParameterData.cs
- EntityContainer.cs
- GridToolTip.cs
- _Semaphore.cs
- XmlUtil.cs
- XamlPathDataSerializer.cs
- GridViewSelectEventArgs.cs
- LinkConverter.cs
- UshortList2.cs
- PatternMatcher.cs
- FixedHighlight.cs
- SqlCacheDependency.cs
- DocumentPage.cs
- QilCloneVisitor.cs
- BackStopAuthenticationModule.cs
- DocumentXPathNavigator.cs
- PrintPreviewControl.cs
- AuthenticationModulesSection.cs
- CachedPathData.cs
- ProxyWebPartConnectionCollection.cs
- DocumentApplication.cs
- CustomValidator.cs
- Material.cs
- UdpTransportSettings.cs
- ContainerFilterService.cs
- UrlUtility.cs
- COM2ComponentEditor.cs
- Padding.cs
- CodeTypeParameter.cs
- PropertyOrder.cs
- NativeMethods.cs
- WebDescriptionAttribute.cs
- CannotUnloadAppDomainException.cs
- PriorityQueue.cs
- WriteableOnDemandStream.cs
- LinearGradientBrush.cs
- InputScopeConverter.cs
- DrawingBrush.cs
- Single.cs
- ConnectionStringsExpressionBuilder.cs
- TextSelection.cs
- UnionQueryOperator.cs
- MatrixCamera.cs
- ControlParameter.cs
- FormsAuthenticationEventArgs.cs
- MasterPageBuildProvider.cs
- BitmapSizeOptions.cs
- SqlConnectionHelper.cs
- SHA256Managed.cs
- ResourceManager.cs