Skip to content

Applies to

net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481

Overloads

  • 1. public ITrackingConfiguration PersistOn(params string[] eventNames)
  • 2. public ITrackingConfiguration PersistOn(string eventName, object eventSourceObject)
  • 3. public ITrackingConfiguration PersistOn(string eventName, Func<object, object> eventSourceGetter)

1. Overload

public ITrackingConfiguration PersistOn(params string[] eventNames)

Summary: Registers the specified event of the target object as a trigger that will cause the target's data to be persisted.

Parameters

NameTypeDescription
params eventNamesstring[]The names of the events that will cause the target object's data to be persisted.

Returns: ITrackingConfiguration -- ITrackingConfiguration.

Remarks

        Automatically persist a target object when it fires the specified name.
        

Examples

        For a Window object, "LocationChanged" and/or "SizeChanged" would be appropriate.
        

2. Overload

public ITrackingConfiguration PersistOn(string eventName, object eventSourceObject)

Summary: Automatically persist a target object when the specified eventSourceObject fires the specified event.

Parameters

NameTypeDescription
eventNamestringName of the event.
eventSourceObjectobjectIf not provided.

Returns: ITrackingConfiguration -- ITrackingConfiguration.

3. Overload

public ITrackingConfiguration PersistOn(string eventName, Func<object, object> eventSourceGetter)

Summary: Automatically persist a target object when the specified eventSourceObject fires the specified event.

Parameters

NameTypeDescription
eventNamestringThe name of the event that should trigger persisting stete.
eventSourceGetterFuncThe event source getter.

Returns: ITrackingConfiguration -- ITrackingConfiguration.