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
- EnumerableRowCollectionExtensions.cs
- FilterQueryOptionExpression.cs
- EllipseGeometry.cs
- StatusBarPanelClickEvent.cs
- FlowLayoutPanel.cs
- ContainerVisual.cs
- ScrollViewer.cs
- EntityDataSourceChangingEventArgs.cs
- basevalidator.cs
- SharedPersonalizationStateInfo.cs
- CodeCommentStatement.cs
- HttpWebRequest.cs
- HostingEnvironment.cs
- TextEffectCollection.cs
- BuildManagerHost.cs
- ListViewPagedDataSource.cs
- DataChangedEventManager.cs
- ILGenerator.cs
- HttpRawResponse.cs
- XmlSchemaElement.cs
- SimpleFieldTemplateUserControl.cs
- DocumentApplication.cs
- Zone.cs
- JournalEntryListConverter.cs
- TreeView.cs
- UxThemeWrapper.cs
- DesignerCommandSet.cs
- TreeViewCancelEvent.cs
- RoutedEventHandlerInfo.cs
- RuntimeArgumentHandle.cs
- SoapMessage.cs
- OleDbEnumerator.cs
- GridItemPattern.cs
- BindingBase.cs
- Stroke2.cs
- LazyLoadBehavior.cs
- PhysicalFontFamily.cs
- ConfigurationManagerInternal.cs
- SafeNativeMethods.cs
- ToolStripOverflow.cs
- DataBoundControlHelper.cs
- PathFigureCollection.cs
- UICuesEvent.cs
- ColumnResizeUndoUnit.cs
- SafeFileHandle.cs
- BuilderPropertyEntry.cs
- CheckBox.cs
- NameNode.cs
- Subset.cs
- DelegatingConfigHost.cs
- HttpRequestCacheValidator.cs
- FactoryRecord.cs
- DbParameterCollectionHelper.cs
- StateWorkerRequest.cs
- TypeConverterHelper.cs
- FormViewDeleteEventArgs.cs
- CodeNamespace.cs
- XmlSchemaCompilationSettings.cs
- ValidateNames.cs
- XmlSchemaComplexContent.cs
- SpStreamWrapper.cs
- ApplyTemplatesAction.cs
- SendKeys.cs
- GridViewHeaderRowPresenter.cs
- TagNameToTypeMapper.cs
- StaticSiteMapProvider.cs
- FrameworkTemplate.cs
- MemberHolder.cs
- MetadataArtifactLoader.cs
- MarkupCompiler.cs
- TextChange.cs
- ArrangedElementCollection.cs
- Condition.cs
- OraclePermission.cs
- DynamicDataRoute.cs
- XmlText.cs
- ViewCellSlot.cs
- BehaviorEditorPart.cs
- SqlTriggerContext.cs
- ComplexPropertyEntry.cs
- FormViewInsertEventArgs.cs
- PermissionToken.cs
- ToolStripComboBox.cs
- DetailsViewPageEventArgs.cs
- DrawingDrawingContext.cs
- TransformDescriptor.cs
- TransformerInfoCollection.cs
- PrivilegeNotHeldException.cs
- HiddenFieldPageStatePersister.cs
- HierarchicalDataBoundControlAdapter.cs
- VectorValueSerializer.cs
- GridViewColumn.cs
- Funcletizer.cs
- XmlWrappingReader.cs
- input.cs
- AdornerLayer.cs
- StringReader.cs
- XmlAttributeOverrides.cs
- HttpRequest.cs
- GridViewRowPresenterBase.cs