ViewService 类

定义

ViewService 类将可视化对象映射到基础模型项。The ViewService class maps visuals to underlying model items.

public ref class ViewService abstract
public abstract class ViewService
type ViewService = class
Public MustInherit Class ViewService
继承
ViewService
派生

注解

必须使用 ModelServiceViewService 类,设计器才能正确执行。The ModelService and ViewService classes are required for the designer to function. DesignerView 类负责处理用户输入并将其路由至命令,该类需要使用这两个服务将用户输入映射回模型。The DesignerView class, which is responsible for processing user input and routing it to commands, requires both of these services to map user input back to the model.

构造函数

ViewService()

创建一个新的 ViewServiceCreates a new ViewService.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetModel(DependencyObject)

返回与视图相对应的模型;如果没有与视图相匹配的模型,则返回 nullReturns the model corresponding to the view, or null if there is no model that matches the view.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetView(ModelItem)

返回与给定模型相对应的视图;如果没有适用于模型的视图,则返回 nullReturns the view corresponding to the given model, or null if there is no view for the model.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于