Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- StorageSetMapping.cs
- DBSchemaRow.cs
- WindowsScrollBarBits.cs
- SocketCache.cs
- Bezier.cs
- SecuritySessionFilter.cs
- AuthenticationService.cs
- PropertyRecord.cs
- TrustManagerMoreInformation.cs
- ScrollChrome.cs
- ComponentChangingEvent.cs
- DisplayToken.cs
- ContractMethodInfo.cs
- MDIControlStrip.cs
- RegexWorker.cs
- InputProviderSite.cs
- ExpressionWriter.cs
- FontNamesConverter.cs
- ContainerTracking.cs
- WebBrowserPermission.cs
- SqlNotificationEventArgs.cs
- SortedList.cs
- SiteMapDataSourceView.cs
- ToolboxCategory.cs
- ZipIOExtraField.cs
- SchemaInfo.cs
- TypeDescriptionProvider.cs
- WindowsScrollBarBits.cs
- FactoryGenerator.cs
- WrappedIUnknown.cs
- ProfileProvider.cs
- ConnectionManagementElement.cs
- nulltextnavigator.cs
- SiteIdentityPermission.cs
- SystemColors.cs
- FileLevelControlBuilderAttribute.cs
- DelegateArgumentReference.cs
- TextControl.cs
- WhitespaceRuleReader.cs
- DataViewSetting.cs
- Matrix.cs
- HitTestParameters3D.cs
- ContextMenuService.cs
- WindowAutomationPeer.cs
- SerializationInfo.cs
- DataTableClearEvent.cs
- ipaddressinformationcollection.cs
- SortFieldComparer.cs
- HebrewCalendar.cs
- EntityModelBuildProvider.cs
- ValidationEventArgs.cs
- sqlcontext.cs
- IPEndPoint.cs
- util.cs
- initElementDictionary.cs
- EncodingNLS.cs
- AudioFormatConverter.cs
- HuffCodec.cs
- ListBoxAutomationPeer.cs
- ResizeGrip.cs
- RegexStringValidatorAttribute.cs
- RelatedView.cs
- TextEditorTables.cs
- ACE.cs
- DetailsViewUpdatedEventArgs.cs
- WebConfigurationHostFileChange.cs
- PlainXmlSerializer.cs
- PageWrapper.cs
- TextBox.cs
- SystemIPGlobalProperties.cs
- MemoryResponseElement.cs
- Animatable.cs
- GridViewEditEventArgs.cs
- JsonDeserializer.cs
- HtmlInputControl.cs
- ThemeableAttribute.cs
- CommandBinding.cs
- IconBitmapDecoder.cs
- InputScopeConverter.cs
- DoubleConverter.cs
- HtmlControlPersistable.cs
- DbConnectionClosed.cs
- Padding.cs
- ConfigXmlElement.cs
- SqlUtils.cs
- Vertex.cs
- BindingOperations.cs
- ProfileGroupSettingsCollection.cs
- RuleInfoComparer.cs
- CompositeControl.cs
- SessionStateContainer.cs
- SymmetricKey.cs
- DateTimeConstantAttribute.cs
- DesignerTransactionCloseEvent.cs
- XPathNodeList.cs
- KeyNotFoundException.cs
- ParallelTimeline.cs
- SoundPlayerAction.cs
- WorkflowApplicationException.cs
- BaseConfigurationRecord.cs