Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / Base / Documents / ViewManager.cs / 1305376 / ViewManager.cs
namespace System.Activities.Presentation.Documents { using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Windows; using System.Windows.Media; using System.Activities.Presentation; using System.Activities.Presentation.Model; using System.Activities.Presentation.Services; ////// A ViewManager is a class that manages and provides the view /// for the designer. The view manager is used by MarkupDocumentManager /// to provide the view for the designer. /// abstract class ViewManager : IDisposable { ////// DependencyPropertyKey that allows ViewManagers to set the PropertyRedirections /// attached property. /// // FxCop: these are immutable [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] protected static readonly DependencyPropertyKey PropertyRedirectionsPropertyKey = DependencyProperty.RegisterAttachedReadOnly( "PropertyRedirections", typeof(IEnumerable), typeof(ViewManager), null); /// /// Dependency property for the PropertyRedirections attached property. /// public static readonly DependencyProperty PropertyRedirectionsProperty = PropertyRedirectionsPropertyKey.DependencyProperty; ////// Returns the view for the designer. This will return null until /// Initialize has been called. /// public abstract Visual View { get; } ////// Returns an enumeration of property identifiers indicating properties on the model that should be /// redirected on the view. The view must declare public properties of the same name and /// compatible data type. When a value is set into the model, if its property is being redirected /// the value will be set into the redirected property instead. /// /// /// The view to retrieve the set of property redirections for. /// ////// An enumeration of property redirections, or null if there are none. /// public static IEnumerableGetPropertyRedirections(DependencyObject view) { if (view == null) throw FxTrace.Exception.ArgumentNull("view"); return (IEnumerable )view.GetValue(PropertyRedirectionsProperty); } /// /// Initializes this view manager with the given model tree. /// /// The editing context for the designer. ///If model is null. public abstract void Initialize(EditingContext context); ////// Sets an enumeration of property identifiers indicating properties on the model that /// should be redirected to the view. The view must declare public properties of the same name /// and compatible type. When a value is set into the model, if its property is being redirected /// the value will be set into the redirected property instead. /// /// /// protected static void SetPropertyRedirections(DependencyObject view, IEnumerableredirections) { if (view == null) throw FxTrace.Exception.ArgumentNull("view"); view.SetValue(PropertyRedirectionsPropertyKey, redirections); } /// /// Disposes this view manager. /// public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } ////// Disposes this view manager. /// True if this object is being disposed, or false if it is finalizing. /// protected virtual void Dispose(bool disposing) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Activities.Presentation.Documents { using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Windows; using System.Windows.Media; using System.Activities.Presentation; using System.Activities.Presentation.Model; using System.Activities.Presentation.Services; ////// A ViewManager is a class that manages and provides the view /// for the designer. The view manager is used by MarkupDocumentManager /// to provide the view for the designer. /// abstract class ViewManager : IDisposable { ////// DependencyPropertyKey that allows ViewManagers to set the PropertyRedirections /// attached property. /// // FxCop: these are immutable [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] protected static readonly DependencyPropertyKey PropertyRedirectionsPropertyKey = DependencyProperty.RegisterAttachedReadOnly( "PropertyRedirections", typeof(IEnumerable), typeof(ViewManager), null); /// /// Dependency property for the PropertyRedirections attached property. /// public static readonly DependencyProperty PropertyRedirectionsProperty = PropertyRedirectionsPropertyKey.DependencyProperty; ////// Returns the view for the designer. This will return null until /// Initialize has been called. /// public abstract Visual View { get; } ////// Returns an enumeration of property identifiers indicating properties on the model that should be /// redirected on the view. The view must declare public properties of the same name and /// compatible data type. When a value is set into the model, if its property is being redirected /// the value will be set into the redirected property instead. /// /// /// The view to retrieve the set of property redirections for. /// ////// An enumeration of property redirections, or null if there are none. /// public static IEnumerableGetPropertyRedirections(DependencyObject view) { if (view == null) throw FxTrace.Exception.ArgumentNull("view"); return (IEnumerable )view.GetValue(PropertyRedirectionsProperty); } /// /// Initializes this view manager with the given model tree. /// /// The editing context for the designer. ///If model is null. public abstract void Initialize(EditingContext context); ////// Sets an enumeration of property identifiers indicating properties on the model that /// should be redirected to the view. The view must declare public properties of the same name /// and compatible type. When a value is set into the model, if its property is being redirected /// the value will be set into the redirected property instead. /// /// /// protected static void SetPropertyRedirections(DependencyObject view, IEnumerableredirections) { if (view == null) throw FxTrace.Exception.ArgumentNull("view"); view.SetValue(PropertyRedirectionsPropertyKey, redirections); } /// /// Disposes this view manager. /// public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } ////// Disposes this view manager. /// True if this object is being disposed, or false if it is finalizing. /// protected virtual void Dispose(bool disposing) { } } } // 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
- ContainerUIElement3D.cs
- FontInfo.cs
- AccessDataSource.cs
- ObservableCollection.cs
- WebConfigurationHost.cs
- CodeTypeReferenceSerializer.cs
- ServiceDurableInstanceContextProvider.cs
- AutoScrollHelper.cs
- SQLByteStorage.cs
- DefaultSerializationProviderAttribute.cs
- DisplayMemberTemplateSelector.cs
- SharedUtils.cs
- MenuAutomationPeer.cs
- XmlSignificantWhitespace.cs
- ModulesEntry.cs
- SoapBinding.cs
- WSDualHttpSecurityMode.cs
- Vector3DIndependentAnimationStorage.cs
- XmlNullResolver.cs
- AlphaSortedEnumConverter.cs
- CompositeFontInfo.cs
- JsonQNameDataContract.cs
- ListViewDeleteEventArgs.cs
- RSAOAEPKeyExchangeDeformatter.cs
- StyleCollectionEditor.cs
- WebResponse.cs
- assertwrapper.cs
- ColorContextHelper.cs
- EntityViewGenerator.cs
- SQLGuidStorage.cs
- ArglessEventHandlerProxy.cs
- MatrixConverter.cs
- ListViewInsertedEventArgs.cs
- TextTreeTextElementNode.cs
- SafeNativeMethods.cs
- ArrayExtension.cs
- TraversalRequest.cs
- SimpleMailWebEventProvider.cs
- ByteStreamGeometryContext.cs
- WebServiceHost.cs
- WindowsProgressbar.cs
- MarkupExtensionParser.cs
- XmlSchemaSimpleTypeList.cs
- ArrayEditor.cs
- SamlAuthenticationClaimResource.cs
- PerSessionInstanceContextProvider.cs
- NetworkStream.cs
- SharedDp.cs
- AccessViolationException.cs
- VScrollBar.cs
- MenuEventArgs.cs
- FlowDocumentPaginator.cs
- HttpCacheVaryByContentEncodings.cs
- StrongTypingException.cs
- MenuStrip.cs
- VerificationAttribute.cs
- SafeLibraryHandle.cs
- DataGridToolTip.cs
- ComAdminWrapper.cs
- AttributeTableBuilder.cs
- ZipIOFileItemStream.cs
- ComponentResourceKeyConverter.cs
- IUnknownConstantAttribute.cs
- FixedTextPointer.cs
- QueryableDataSource.cs
- ScrollChrome.cs
- SqlDelegatedTransaction.cs
- TiffBitmapEncoder.cs
- ReachDocumentSequenceSerializerAsync.cs
- DateTimeStorage.cs
- TraceSection.cs
- BaseValidatorDesigner.cs
- HtmlButton.cs
- DesignerVerbCollection.cs
- HtmlInputCheckBox.cs
- TrackBarDesigner.cs
- XmlRawWriter.cs
- XPathEmptyIterator.cs
- ReflectionTypeLoadException.cs
- CommonObjectSecurity.cs
- XmlJsonWriter.cs
- HtmlShim.cs
- PrintPreviewControl.cs
- CustomPopupPlacement.cs
- SQLResource.cs
- OleDbWrapper.cs
- MasterPageParser.cs
- PrePrepareMethodAttribute.cs
- ResourceDescriptionAttribute.cs
- NamespaceQuery.cs
- ArrayWithOffset.cs
- XamlToRtfWriter.cs
- MLangCodePageEncoding.cs
- PlaceHolder.cs
- HwndProxyElementProvider.cs
- InvalidChannelBindingException.cs
- WebBaseEventKeyComparer.cs
- PointLight.cs
- TableSectionStyle.cs
- ToolStripContentPanelRenderEventArgs.cs