//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //------------------------------------------------------------------------------ namespace System.Activities.Presentation.Services { using System; using System.Windows; using System.Activities.Presentation.Model; /// /// This service allows you to move between the model and the view. /// public abstract class ViewService { /// /// Constructs a new ViewService. /// protected ViewService() { } /// /// Returns the model corresponding to the view, or null if /// there is no model matching the view. /// /// /// The view object you wish to find the model for. /// /// /// The corresponding model, or null if there is no model for the /// given view object. /// /// if view is null. public abstract ModelItem GetModel(DependencyObject view); /// /// Returns the view corresponding to the given model. This /// can return null if there is no view for the model. /// /// /// The model to return the view object for. /// /// /// The view for this model, or null if there is no view. /// /// if model is null. /// if model does not represent a valid model for this service. public abstract DependencyObject GetView(ModelItem model); } }