Skip to content

[])} ,System.Object)} ,System.Func{-0,System.Object})}

TrackingConfiguration.PersistOn(Func[]) method

Defined in

Type: TrackingConfiguration Namespace: CrissCross.WPF.UI.Configuration Assembly: CrissCross.WPF.UI.dll

Applies to

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

Overloads

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

1. Overload

public TrackingConfiguration<T> PersistOn(params Func<T, 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 eventNamesFunc<T, string>[]The names of the events that will cause the target object's data to be persisted.

Returns: TrackingConfiguration -- Tracking Configuration.

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 TrackingConfiguration<T> PersistOn(Func<T, string> eventName, object eventSourceObject)

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

Parameters

NameTypeDescription
eventNameFuncName of the event.
eventSourceObjectobjectIf not provided.

Returns: TrackingConfiguration -- Tracking Configuration.

3. Overload

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

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

Parameters

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

Returns: TrackingConfiguration -- Tracking Configuration.