ViewStateService.StoreViewStateWithUndo(ModelItem, String, Object) 方法

定义

在派生类中实现时,记录由指定键表示的项的当前设置,使它可供撤消操作使用。When implemented in a derived class, records the current setting of the item represented by the specified key so that it is available for an undo operation. 然后,由指定键表示的项存储到指定模型项的视图状态中。The item represented by the specified key is then stored in the view state of the specified model item.

public:
 abstract void StoreViewStateWithUndo(System::Activities::Presentation::Model::ModelItem ^ modelItem, System::String ^ key, System::Object ^ value);
public abstract void StoreViewStateWithUndo (System.Activities.Presentation.Model.ModelItem modelItem, string key, object value);
abstract member StoreViewStateWithUndo : System.Activities.Presentation.Model.ModelItem * string * obj -> unit
Public MustOverride Sub StoreViewStateWithUndo (modelItem As ModelItem, key As String, value As Object)

参数

modelItem
ModelItem

要将视图状态应用到的 ModelItemThe ModelItem that the view state applies to.

key
String

标识要存储的视图状态的 StringThe String that identifies the aspect of the view state that is to be stored. 标识所存储的视图状态项的 StringThe String that identifies the view state item that is stored.

value
Object

要存储的 ObjectAn Object to be stored.

注解

可通过调用 RetrieveViewState 并传递与 modelItemkey 相同的值,来检索存储的对象。You can retrieve the stored object by calling RetrieveViewState and passing the same values for modelItem and key.

适用于